Lines Matching refs:sectorsize

90 static int test_bitmaps(struct btrfs_block_group *cache, u32 sectorsize)  in test_bitmaps()  argument
130 next_bitmap_offset = (u64)(BITS_PER_BITMAP * sectorsize); in test_bitmaps()
159 u32 sectorsize) in test_bitmaps_and_extents() argument
161 u64 bitmap_offset = (u64)(BITS_PER_BITMAP * sectorsize); in test_bitmaps_and_extents()
396 u32 sectorsize) in test_steal_space_from_bitmap_to_extent() argument
533 ret = btrfs_add_free_space(cache, SZ_128M + SZ_16M, sectorsize); in test_steal_space_from_bitmap_to_extent()
591 if (cache->free_space_ctl->free_space != (SZ_1M + sectorsize)) { in test_steal_space_from_bitmap_to_extent()
592 test_err("cache free space is not 1Mb + %u", sectorsize); in test_steal_space_from_bitmap_to_extent()
614 if (cache->free_space_ctl->free_space != sectorsize) { in test_steal_space_from_bitmap_to_extent()
615 test_err("cache free space is not %u", sectorsize); in test_steal_space_from_bitmap_to_extent()
620 0, sectorsize, 0, in test_steal_space_from_bitmap_to_extent()
624 sectorsize, offset); in test_steal_space_from_bitmap_to_extent()
731 ret = btrfs_add_free_space(cache, SZ_32M, 2 * sectorsize); in test_steal_space_from_bitmap_to_extent()
781 if (cache->free_space_ctl->free_space != (SZ_1M + 2 * sectorsize)) { in test_steal_space_from_bitmap_to_extent()
782 test_err("cache free space is not 1Mb + %u", 2 * sectorsize); in test_steal_space_from_bitmap_to_extent()
803 if (cache->free_space_ctl->free_space != 2 * sectorsize) { in test_steal_space_from_bitmap_to_extent()
804 test_err("cache free space is not %u", 2 * sectorsize); in test_steal_space_from_bitmap_to_extent()
809 0, 2 * sectorsize, 0, in test_steal_space_from_bitmap_to_extent()
813 2 * sectorsize, offset); in test_steal_space_from_bitmap_to_extent()
833 static int test_bytes_index(struct btrfs_block_group *cache, u32 sectorsize) in test_bytes_index() argument
856 offset += bytes + sectorsize; in test_bytes_index()
873 offset = i * BITS_PER_BITMAP * sectorsize; in test_bytes_index()
898 ret = test_add_free_space_entry(cache, 0, sectorsize, 1); in test_bytes_index()
904 offset = BITS_PER_BITMAP * sectorsize; in test_bytes_index()
905 ret = test_add_free_space_entry(cache, offset, sectorsize, 1); in test_bytes_index()
916 offset = sectorsize * i; in test_bytes_index()
917 ret = btrfs_add_free_space(cache, offset, sectorsize); in test_bytes_index()
928 offset = (BITS_PER_BITMAP * sectorsize) + sectorsize; in test_bytes_index()
929 ret = btrfs_add_free_space(cache, offset, sectorsize); in test_bytes_index()
941 if (entry->bytes != (10 * sectorsize)) { in test_bytes_index()
947 offset = btrfs_find_space_for_alloc(cache, cache->start, sectorsize * 3, in test_bytes_index()
954 if (max_extent_size != (2 * sectorsize)) { in test_bytes_index()
956 max_extent_size, (unsigned long long)(2 * sectorsize)); in test_bytes_index()
966 if (entry->bytes != (2 * sectorsize)) { in test_bytes_index()
972 offset = (BITS_PER_BITMAP * sectorsize) - sectorsize; in test_bytes_index()
973 ret = btrfs_add_free_space(cache, offset, sectorsize); in test_bytes_index()
981 if (entry->bytes != (11 * sectorsize)) { in test_bytes_index()
991 offset = btrfs_find_space_for_alloc(cache, cache->start, sectorsize * 2, in test_bytes_index()
993 if (offset != (BITS_PER_BITMAP * sectorsize)) { in test_bytes_index()
996 (unsigned long long)(BITS_PER_BITMAP * sectorsize)); in test_bytes_index()
1005 int btrfs_test_free_space_cache(u32 sectorsize, u32 nodesize) in btrfs_test_free_space_cache() argument
1013 fs_info = btrfs_alloc_dummy_fs_info(nodesize, sectorsize); in btrfs_test_free_space_cache()
1025 BITS_PER_BITMAP * sectorsize + PAGE_SIZE); in btrfs_test_free_space_cache()
1047 ret = test_bitmaps(cache, sectorsize); in btrfs_test_free_space_cache()
1050 ret = test_bitmaps_and_extents(cache, sectorsize); in btrfs_test_free_space_cache()
1054 ret = test_steal_space_from_bitmap_to_extent(cache, sectorsize); in btrfs_test_free_space_cache()
1057 ret = test_bytes_index(cache, sectorsize); in btrfs_test_free_space_cache()