Lines Matching +full:1 +full:k
26 if (refcount_read(&em->refs) != 1) { in free_extent_map_tree()
32 refcount_set(&em->refs, 1); in free_extent_map_tree()
44 * extent [0, 16K), followed by another file extent [16K, 20K), two dio reads
45 * are entering btrfs_get_extent() concurrently, t1 is reading [8K, 16K), t2 is
46 * reading [0, 8K)
51 * -> add_extent_mapping(0, 16K)
53 * ->add_extent_mapping(0, 16K)
70 /* Add [0, 16K) */ in test_case_1()
79 test_err("cannot add extent range [0, 16K)"); in test_case_1()
84 /* Add [16K, 20K) following [0, 16K) */ in test_case_1()
100 test_err("cannot add extent range [16K, 20K)"); in test_case_1()
112 /* Add [0, 8K), should return [0, 16K) instead. */ in test_case_1()
158 /* Add [0, 1K) */ in test_case_2()
162 em->block_len = (u64)-1; in test_case_2()
167 test_err("cannot add extent range [0, 1K)"); in test_case_2()
172 /* Add [4K, 8K) following [0, 1K) */ in test_case_2()
188 test_err("cannot add extent range [4K, 8K)"); in test_case_2()
200 /* Add [0, 1K) */ in test_case_2()
204 em->block_len = (u64)-1; in test_case_2()
209 test_err("case2 [0 1K]: ret %d", ret); in test_case_2()
214 em->block_start != EXTENT_MAP_INLINE || em->block_len != (u64)-1)) { in test_case_2()
216 "case2 [0 1K]: ret %d return a wrong em (start %llu len %llu block_start %llu block_len %llu", in test_case_2()
241 /* Add [4K, 8K) */ in __test_case_3()
250 test_err("cannot add extent range [4K, 8K)"); in __test_case_3()
262 /* Add [0, 16K) */ in __test_case_3()
299 * There is a file extent [0, 16K), two jobs are running concurrently
300 * against it, t1 is buffered writing to [4K, 8K) and t2 is doing dio
301 * read from [0, 4K) or [8K, 12K) or [12K, 16K).
303 * t1 goes ahead of t2 and adds em [4K, 8K) into tree.
340 /* Add [0K, 8K) */ in __test_case_4()
349 test_err("cannot add extent range [0, 8K)"); in __test_case_4()
361 /* Add [8K, 32K) */ in __test_case_4()
370 test_err("cannot add extent range [8K, 32K)"); in __test_case_4()
381 /* Add [0K, 32K) */ in __test_case_4()
412 * There is a file extent [0, 32K), two jobs are running concurrently
413 * against it, t1 is doing dio write to [8K, 32K) and t2 is doing dio
414 * read from [0, 4K) or [4K, 8K).
416 * t1 goes ahead of t2 and splits em [0, 32K) to em [0K, 8K) and [8K 32K).
423 * # load [0, 32K)
426 * # split [0, 32K)
428 * # add [8K, 32K)
431 * # [0, 32K)
483 { .start = 0, .len = SZ_8K }, /* [0, 8K) */
484 { .start = SZ_4K * 3, .len = SZ_4K * 3}, /* [12k, 24k) */
485 { .start = SZ_4K * 6, .len = SZ_4K * 3}, /* [24k, 36k) */
486 { .start = SZ_32K + SZ_4K, .len = SZ_4K}, /* [36k, 40k) */
487 { .start = SZ_4K * 10, .len = SZ_4K * 6}, /* [40k, 64k) */
490 { .start = 0, .len = SZ_8K }, /* [0, 8K) */
491 { .start = SZ_4K * 5, .len = SZ_4K}, /* [20k, 24k) */
492 { .start = SZ_4K * 6, .len = SZ_4K * 3}, /* [24k, 36k) */
493 { .start = SZ_32K + SZ_4K, .len = SZ_4K}, /* [36k, 40k) */
494 { .start = SZ_4K * 10, .len = SZ_4K * 6}, /* [40k, 64k) */
497 { .start = 0, .len = SZ_8K }, /* [0, 8K) */
498 { .start = SZ_4K * 5, .len = SZ_4K}, /* [20k, 24k) */
499 { .start = SZ_4K * 6, .len = SZ_4K}, /* [24k, 28k) */
500 { .start = SZ_32K, .len = SZ_4K}, /* [32k, 36k) */
501 { .start = SZ_32K + SZ_4K, .len = SZ_4K}, /* [36k, 40k) */
502 { .start = SZ_4K * 10, .len = SZ_4K * 6}, /* [40k, 64k) */
505 { .start = 0, .len = SZ_8K}, /* [0, 8K) */
506 { .start = SZ_4K * 5, .len = SZ_4K}, /* [20k, 24k) */
507 { .start = SZ_4K * 6, .len = SZ_4K}, /* [24k, 28k) */
558 * [0, 12k)[12k, 24k)[24k, 36k)[36k, 40k)[40k,64k)
562 * [8k, 12k) - test the single front split
563 * [12k, 20k) - test the single back split
564 * [28k, 32k) - test the double split
565 * [32k, 64k) - test whole em dropping
587 /* [0, 12k) */ in test_case_5()
590 test_err("cannot add extent range [0, 12K)"); in test_case_5()
594 /* [12k, 24k) */ in test_case_5()
597 test_err("cannot add extent range [12k, 24k)"); in test_case_5()
601 /* [24k, 36k) */ in test_case_5()
604 test_err("cannot add extent range [12k, 24k)"); in test_case_5()
608 /* [36k, 40k) */ in test_case_5()
611 test_err("cannot add extent range [12k, 24k)"); in test_case_5()
615 /* [40k, 64k) */ in test_case_5()
618 test_err("cannot add extent range [12k, 24k)"); in test_case_5()
622 /* Drop [8k, 12k) */ in test_case_5()
624 end = (3 * SZ_4K) - 1; in test_case_5()
630 /* Drop [12k, 20k) */ in test_case_5()
632 end = SZ_16K + SZ_4K - 1; in test_case_5()
634 ret = validate_range(&BTRFS_I(inode)->extent_tree, 1); in test_case_5()
638 /* Drop [28k, 32k) */ in test_case_5()
640 end = SZ_32K - 1; in test_case_5()
646 /* Drop [32k, 64k) */ in test_case_5()
648 end = SZ_64K - 1; in test_case_5()
701 test_err("unexpected em->len %llu, expected 4K", em->len); in test_case_6()
740 /* [0, 16K), pinned */ in test_case_7()
762 /* [32K, 48K), not pinned */ in test_case_7()
777 * Drop [0, 36K) This should skip the [0, 4K) extent and then split the in test_case_7()
778 * [32K, 48K) extent. in test_case_7()
780 btrfs_drop_extent_map_range(BTRFS_I(inode), 0, (36 * SZ_1K) - 1, true); in test_case_7()
797 test_err("em->len is %llu, expected 16K", em->len); in test_case_7()
815 test_err("didn't find an em at 32K as expected"); in test_case_7()
820 test_err("em->start is %llu, expected 36K", em->start); in test_case_7()
825 test_err("em->len is %llu, expected 12K", em->len); in test_case_7()
832 em = lookup_extent_mapping(em_tree, 48 * SZ_1K, (u64)-1); in test_case_7()
835 test_err("found an unexpected em above 48K"); in test_case_7()
912 ret = btrfs_rmap_block(fs_info, em->start, btrfs_sb_offset(1), in test_rmap_block()
985 .num_data_stripes = 1, in btrfs_test_extent_map()
986 .num_stripes = 1, in btrfs_test_extent_map()