Lines Matching +full:32 +full:k

36 	struct bkey_i_cookie k;  in test_delete()  local
39 bkey_cookie_init(&k.k_i); in test_delete()
40 k.k.p.snapshot = U32_MAX; in test_delete()
42 bch2_trans_iter_init(trans, &iter, BTREE_ID_xattrs, k.k.p, in test_delete()
47 bch2_trans_update(trans, &iter, &k.k_i, 0)); in test_delete()
77 struct bkey_i_cookie k; in test_delete_written() local
80 bkey_cookie_init(&k.k_i); in test_delete_written()
81 k.k.p.snapshot = U32_MAX; in test_delete_written()
83 bch2_trans_iter_init(trans, &iter, BTREE_ID_xattrs, k.k.p, in test_delete_written()
88 bch2_trans_update(trans, &iter, &k.k_i, 0)); in test_delete_written()
121 ck.k.p.offset = i; in test_iterate()
122 ck.k.p.snapshot = U32_MAX; in test_iterate()
136 0, k, ({ in test_iterate()
137 BUG_ON(k.k->p.offset != i++); in test_iterate()
150 SPOS(0, U64_MAX, U32_MAX), 0, k, ({ in test_iterate()
151 BUG_ON(k.k->p.offset != --i); in test_iterate()
175 ck.k.p.offset = i + 8; in test_iterate_extents()
176 ck.k.p.snapshot = U32_MAX; in test_iterate_extents()
177 ck.k.size = 8; in test_iterate_extents()
191 0, k, ({ in test_iterate_extents()
192 BUG_ON(bkey_start_offset(k.k) != i); in test_iterate_extents()
193 i = k.k->p.offset; in test_iterate_extents()
206 SPOS(0, U64_MAX, U32_MAX), 0, k, ({ in test_iterate_extents()
207 BUG_ON(k.k->p.offset != i); in test_iterate_extents()
208 i = bkey_start_offset(k.k); in test_iterate_extents()
232 ck.k.p.offset = i * 2; in test_iterate_slots()
233 ck.k.p.snapshot = U32_MAX; in test_iterate_slots()
247 0, k, ({ in test_iterate_slots()
248 BUG_ON(k.k->p.offset != i); in test_iterate_slots()
264 BTREE_ITER_slots, k, ({ in test_iterate_slots()
268 BUG_ON(k.k->p.offset != i); in test_iterate_slots()
269 BUG_ON(bkey_deleted(k.k) != (i & 1)); in test_iterate_slots()
291 ck.k.p.offset = i + 16; in test_iterate_slots_extents()
292 ck.k.p.snapshot = U32_MAX; in test_iterate_slots_extents()
293 ck.k.size = 8; in test_iterate_slots_extents()
307 0, k, ({ in test_iterate_slots_extents()
308 BUG_ON(bkey_start_offset(k.k) != i + 8); in test_iterate_slots_extents()
309 BUG_ON(k.k->size != 8); in test_iterate_slots_extents()
325 BTREE_ITER_slots, k, ({ in test_iterate_slots_extents()
328 BUG_ON(bkey_deleted(k.k) != !(i % 16)); in test_iterate_slots_extents()
330 BUG_ON(bkey_start_offset(k.k) != i); in test_iterate_slots_extents()
331 BUG_ON(k.k->size != 8); in test_iterate_slots_extents()
332 i = k.k->p.offset; in test_iterate_slots_extents()
347 struct bkey_s_c k; in test_peek_end() local
352 lockrestart_do(trans, bkey_err(k = bch2_btree_iter_peek_upto(&iter, POS(0, U64_MAX)))); in test_peek_end()
353 BUG_ON(k.k); in test_peek_end()
355 lockrestart_do(trans, bkey_err(k = bch2_btree_iter_peek_upto(&iter, POS(0, U64_MAX)))); in test_peek_end()
356 BUG_ON(k.k); in test_peek_end()
367 struct bkey_s_c k; in test_peek_end_extents() local
372 lockrestart_do(trans, bkey_err(k = bch2_btree_iter_peek_upto(&iter, POS(0, U64_MAX)))); in test_peek_end_extents()
373 BUG_ON(k.k); in test_peek_end_extents()
375 lockrestart_do(trans, bkey_err(k = bch2_btree_iter_peek_upto(&iter, POS(0, U64_MAX)))); in test_peek_end_extents()
376 BUG_ON(k.k); in test_peek_end_extents()
390 struct bkey_i_cookie k; in insert_test_extent() local
393 bkey_cookie_init(&k.k_i); in insert_test_extent()
394 k.k_i.k.p.offset = end; in insert_test_extent()
395 k.k_i.k.p.snapshot = U32_MAX; in insert_test_extent()
396 k.k_i.k.size = end - start; in insert_test_extent()
397 k.k_i.k.bversion.lo = test_version++; in insert_test_extent()
399 ret = bch2_btree_insert(c, BTREE_ID_extents, &k.k_i, NULL, 0, 0); in insert_test_extent()
419 return __test_extent_overwrite(c, 0, 64, 0, 32) ?: in test_extent_overwrite_front()
420 __test_extent_overwrite(c, 8, 64, 0, 32); in test_extent_overwrite_front()
425 return __test_extent_overwrite(c, 0, 64, 32, 64) ?: in test_extent_overwrite_back()
426 __test_extent_overwrite(c, 0, 64, 32, 72); in test_extent_overwrite_back()
431 return __test_extent_overwrite(c, 0, 64, 32, 40); in test_extent_overwrite_middle()
436 return __test_extent_overwrite(c, 32, 64, 0, 64) ?: in test_extent_overwrite_all()
437 __test_extent_overwrite(c, 32, 64, 0, 128) ?: in test_extent_overwrite_all()
438 __test_extent_overwrite(c, 32, 64, 32, 64) ?: in test_extent_overwrite_all()
439 __test_extent_overwrite(c, 32, 64, 32, 128); in test_extent_overwrite_all()
444 struct bkey_i_cookie k; in insert_test_overlapping_extent() local
447 bkey_cookie_init(&k.k_i); in insert_test_overlapping_extent()
448 k.k_i.k.p.inode = inum; in insert_test_overlapping_extent()
449 k.k_i.k.p.offset = start + len; in insert_test_overlapping_extent()
450 k.k_i.k.p.snapshot = snapid; in insert_test_overlapping_extent()
451 k.k_i.k.size = len; in insert_test_overlapping_extent()
454 bch2_btree_insert_nonextent(trans, BTREE_ID_extents, &k.k_i, in insert_test_overlapping_extent()
465 insert_test_overlapping_extent(c, inum, 32, 8, U32_MAX - 2) ?: /* overwrite front/back */ in test_extent_create_overlapping()
478 struct bkey_s_c k; in test_snapshot_filter() local
483 cookie.k.p.snapshot = snapid_hi; in test_snapshot_filter()
491 lockrestart_do(trans, bkey_err(k = bch2_btree_iter_peek_upto(&iter, POS(0, U64_MAX)))); in test_snapshot_filter()
493 BUG_ON(k.k->p.snapshot != U32_MAX); in test_snapshot_filter()
508 cookie.k.p.snapshot = U32_MAX; in test_snapshots()
542 struct bkey_i_cookie k; in rand_insert() local
547 bkey_cookie_init(&k.k_i); in rand_insert()
548 k.k.p.offset = test_rand(); in rand_insert()
549 k.k.p.snapshot = U32_MAX; in rand_insert()
552 bch2_btree_insert_trans(trans, BTREE_ID_xattrs, &k.k_i, 0)); in rand_insert()
564 struct bkey_i_cookie k[8]; in rand_insert_multi() local
569 for (i = 0; i < nr; i += ARRAY_SIZE(k)) { in rand_insert_multi()
570 for (j = 0; j < ARRAY_SIZE(k); j++) { in rand_insert_multi()
571 bkey_cookie_init(&k[j].k_i); in rand_insert_multi()
572 k[j].k.p.offset = test_rand(); in rand_insert_multi()
573 k[j].k.p.snapshot = U32_MAX; in rand_insert_multi()
577 bch2_btree_insert_trans(trans, BTREE_ID_xattrs, &k[0].k_i, 0) ?: in rand_insert_multi()
578 bch2_btree_insert_trans(trans, BTREE_ID_xattrs, &k[1].k_i, 0) ?: in rand_insert_multi()
579 bch2_btree_insert_trans(trans, BTREE_ID_xattrs, &k[2].k_i, 0) ?: in rand_insert_multi()
580 bch2_btree_insert_trans(trans, BTREE_ID_xattrs, &k[3].k_i, 0) ?: in rand_insert_multi()
581 bch2_btree_insert_trans(trans, BTREE_ID_xattrs, &k[4].k_i, 0) ?: in rand_insert_multi()
582 bch2_btree_insert_trans(trans, BTREE_ID_xattrs, &k[5].k_i, 0) ?: in rand_insert_multi()
583 bch2_btree_insert_trans(trans, BTREE_ID_xattrs, &k[6].k_i, 0) ?: in rand_insert_multi()
584 bch2_btree_insert_trans(trans, BTREE_ID_xattrs, &k[7].k_i, 0)); in rand_insert_multi()
597 struct bkey_s_c k; in rand_lookup() local
607 lockrestart_do(trans, bkey_err(k = bch2_btree_iter_peek(&iter))); in rand_lookup()
608 ret = bkey_err(k); in rand_lookup()
623 struct bkey_s_c k; in rand_mixed_trans() local
628 k = bch2_btree_iter_peek(iter); in rand_mixed_trans()
629 ret = bkey_err(k); in rand_mixed_trans()
634 if (!(i & 3) && k.k) { in rand_mixed_trans()
636 cookie->k.p = iter->pos; in rand_mixed_trans()
670 struct bkey_s_c k; in __do_delete() local
675 k = bch2_btree_iter_peek_upto(&iter, POS(0, U64_MAX)); in __do_delete()
676 ret = bkey_err(k); in __do_delete()
680 if (!k.k) in __do_delete()
717 BTREE_ITER_slots|BTREE_ITER_intent, k, in seq_insert()
721 insert.k.p = iter.pos; in seq_insert()
731 0, k, in seq_lookup()
740 BTREE_ITER_intent, k, in seq_overwrite()
744 bkey_reassemble(&u.k_i, k); in seq_overwrite()