Lines Matching defs:blk_lpos
40 * blk_lpos structs pointing to associated text data blocks (see
111 * referenced by blk_lpos structs that point to the logical position of the
124 * 2) The blk_lpos struct within the descriptor associated with the data
132 * beginning of the byte array. The referencing blk_lpos will point to the
576 struct prb_data_blk_lpos *blk_lpos = &desc.text_blk_lpos;
587 * the blk_lpos of that descriptor will be checked to make
606 if (blk_lpos->begin != lpos_begin)
615 if (blk_lpos->begin != lpos_begin)
621 lpos_begin = blk_lpos->next;
1026 struct prb_data_blk_lpos *blk_lpos, unsigned long id)
1039 blk_lpos->begin = EMPTY_LINE_LPOS;
1040 blk_lpos->next = EMPTY_LINE_LPOS;
1062 blk_lpos->begin = FAILED_LPOS;
1063 blk_lpos->next = FAILED_LPOS;
1101 blk_lpos->begin = begin_lpos;
1102 blk_lpos->next = next_lpos;
1120 struct prb_data_blk_lpos *blk_lpos, unsigned long id)
1128 /* Reallocation only works if @blk_lpos is the newest data block. */
1130 if (head_lpos != blk_lpos->next)
1133 /* Keep track if @blk_lpos was a wrapping data block. */
1134 wrapped = (DATA_WRAPS(data_ring, blk_lpos->begin) != DATA_WRAPS(data_ring, blk_lpos->next));
1138 next_lpos = get_next_lpos(data_ring, blk_lpos->begin, size);
1145 blk = to_block(data_ring, blk_lpos->begin);
1157 if (WARN_ON_ONCE(next_lpos - blk_lpos->begin > DATA_SIZE(data_ring)) ||
1168 blk = to_block(data_ring, blk_lpos->begin);
1170 if (DATA_WRAPS(data_ring, blk_lpos->begin) != DATA_WRAPS(data_ring, next_lpos)) {
1189 (blk_lpos->next - blk_lpos->begin) - sizeof(blk->id));
1193 blk_lpos->next = next_lpos;
1200 struct prb_data_blk_lpos *blk_lpos)
1203 if (BLK_DATALESS(blk_lpos))
1206 if (DATA_WRAPS(data_ring, blk_lpos->begin) == DATA_WRAPS(data_ring, blk_lpos->next)) {
1208 return (DATA_INDEX(data_ring, blk_lpos->next) -
1209 DATA_INDEX(data_ring, blk_lpos->begin));
1216 return (DATA_INDEX(data_ring, blk_lpos->next) +
1217 DATA_SIZE(data_ring) - DATA_INDEX(data_ring, blk_lpos->begin));
1221 * Given @blk_lpos, return a pointer to the writer data from the data block
1223 * @blk_lpos specifies values that could never be legal.
1230 struct prb_data_blk_lpos *blk_lpos,
1236 if (BLK_DATALESS(blk_lpos)) {
1242 if (blk_lpos->begin == EMPTY_LINE_LPOS &&
1243 blk_lpos->next == EMPTY_LINE_LPOS) {
1253 if (DATA_WRAPS(data_ring, blk_lpos->begin) == DATA_WRAPS(data_ring, blk_lpos->next) &&
1254 blk_lpos->begin < blk_lpos->next) {
1255 db = to_block(data_ring, blk_lpos->begin);
1256 *data_size = blk_lpos->next - blk_lpos->begin;
1259 } else if (DATA_WRAPS(data_ring, blk_lpos->begin + DATA_SIZE(data_ring)) ==
1260 DATA_WRAPS(data_ring, blk_lpos->next)) {
1262 *data_size = DATA_INDEX(data_ring, blk_lpos->next);
1271 if (WARN_ON_ONCE(blk_lpos->begin != ALIGN(blk_lpos->begin, sizeof(db->id))) ||
1272 WARN_ON_ONCE(blk_lpos->next != ALIGN(blk_lpos->next, sizeof(db->id)))) {
1827 * Given @blk_lpos, copy an expected @len of data into the provided buffer.
1835 struct prb_data_blk_lpos *blk_lpos, u16 len, char *buf,
1845 data = get_data(data_ring, blk_lpos, &data_size);
1888 struct prb_data_blk_lpos *blk_lpos = &desc_out->text_blk_lpos;
1912 (blk_lpos->begin == FAILED_LPOS && blk_lpos->next == FAILED_LPOS)) {