Lines Matching defs:in

106 	unsigned		bits;	/* bits remaining in current word */
137 unsigned bits; /* bits remaining in current word */
228 const struct bkey_packed *in)
231 struct unpack_state in_s = unpack_state_init(in_f, in);
242 EBUG_ON(in->u64s - in_f->key_u64s + out_f->key_u64s > U8_MAX);
245 out->u64s = out_f->key_u64s + in->u64s - in_f->key_u64s;
246 out->needs_whiteout = in->needs_whiteout;
247 out->type = in->type;
255 const struct bkey_packed *in)
257 if (!bch2_bkey_transform_key(out_f, out, in_f, in))
261 (u64 *) in + in_f->key_u64s,
262 (in->u64s - in_f->key_u64s));
267 const struct bkey_packed *in)
269 struct unpack_state state = unpack_state_init(format, in);
273 EBUG_ON(in->u64s < format->key_u64s);
274 EBUG_ON(in->format != KEY_FORMAT_LOCAL_BTREE);
275 EBUG_ON(in->u64s - format->key_u64s + BKEY_U64s > U8_MAX);
277 out.u64s = BKEY_U64s + in->u64s - format->key_u64s;
279 out.needs_whiteout = in->needs_whiteout;
280 out.type = in->type;
292 const struct bkey_packed *in)
294 struct unpack_state state = unpack_state_init(format, in);
298 EBUG_ON(in->u64s < format->key_u64s);
299 EBUG_ON(in->format != KEY_FORMAT_LOCAL_BTREE);
312 * @in: key to pack
317 bool bch2_bkey_pack_key(struct bkey_packed *out, const struct bkey *in,
323 EBUG_ON((void *) in == (void *) out);
325 EBUG_ON(in->format != KEY_FORMAT_CURRENT);
329 #define x(id, field) if (!set_inc_field(&state, id, in->field)) return false;
333 out->u64s = format->key_u64s + in->u64s - BKEY_U64s;
335 out->needs_whiteout = in->needs_whiteout;
336 out->type = in->type;
338 bch2_bkey_pack_verify(out, in, format);
461 * Returns a packed key that compares <= in
463 * This is used in bset_search_tree(), where we need a packed pos in order to be
464 * able to compare against the keys in the auxiliary search tree - and it's
469 struct bpos in,
476 struct bpos orig = in;
489 if (unlikely(in.snapshot <
491 if (!in.offset-- &&
492 !in.inode--)
494 in.snapshot = KEY_SNAPSHOT_MAX;
498 if (unlikely(in.offset <
500 if (!in.inode--)
502 in.offset = KEY_OFFSET_MAX;
503 in.snapshot = KEY_SNAPSHOT_MAX;
507 if (unlikely(in.inode <
511 if (unlikely(!set_inc_field_lossy(&state, BKEY_FIELD_INODE, in.inode))) {
512 in.offset = KEY_OFFSET_MAX;
513 in.snapshot = KEY_SNAPSHOT_MAX;
517 if (unlikely(!set_inc_field_lossy(&state, BKEY_FIELD_OFFSET, in.offset))) {
518 in.snapshot = KEY_SNAPSHOT_MAX;
522 if (unlikely(!set_inc_field_lossy(&state, BKEY_FIELD_SNAPSHOT, in.snapshot)))