Home
last modified time | relevance | path

Searched refs:num_stripes (Results 1 – 15 of 15) sorted by relevance

/fs/btrfs/
Dvolumes.c3019 u32 num_stripes; in btrfs_del_sys_chunk() local
3039 num_stripes = btrfs_stack_chunk_num_stripes(chunk); in btrfs_del_sys_chunk()
3040 len += btrfs_chunk_item_size(num_stripes); in btrfs_del_sys_chunk()
3107 for (i = 0; i < map->num_stripes; i++) { in remove_chunk_item()
3150 for (i = 0; i < map->num_stripes; i++) { in btrfs_remove_chunk()
3705 int num_stripes = btrfs_chunk_num_stripes(leaf, chunk); in chunk_devid_filter() local
3708 for (i = 0; i < num_stripes; i++) { in chunk_devid_filter()
3717 static u64 calc_data_stripes(u64 type, int num_stripes) in calc_data_stripes() argument
3723 return (num_stripes - nparity) / ncopies; in calc_data_stripes()
3732 int num_stripes = btrfs_chunk_num_stripes(leaf, chunk); in chunk_drange_filter() local
[all …]
Dtree-checker.c797 u16 num_stripes; in btrfs_check_chunk_valid() local
808 num_stripes = btrfs_chunk_num_stripes(leaf, chunk); in btrfs_check_chunk_valid()
815 if (unlikely(!num_stripes)) { in btrfs_check_chunk_valid()
817 "invalid chunk num_stripes, have %u", num_stripes); in btrfs_check_chunk_valid()
820 if (unlikely(num_stripes < ncopies)) { in btrfs_check_chunk_valid()
823 num_stripes, ncopies); in btrfs_check_chunk_valid()
826 if (unlikely(nparity && num_stripes == nparity)) { in btrfs_check_chunk_valid()
829 num_stripes, nparity); in btrfs_check_chunk_valid()
911 num_stripes != btrfs_raid_array[BTRFS_RAID_RAID1].devs_min) || in btrfs_check_chunk_valid()
913 num_stripes != btrfs_raid_array[BTRFS_RAID_RAID1C3].devs_min) || in btrfs_check_chunk_valid()
[all …]
Dprint-tree.c51 int num_stripes = btrfs_chunk_num_stripes(eb, chunk); in print_chunk() local
55 btrfs_chunk_type(eb, chunk), num_stripes); in print_chunk()
56 for (i = 0 ; i < num_stripes ; i++) { in print_chunk()
Dzoned.c1313 cache->physical_map = kmemdup(map, map_lookup_size(map->num_stripes), GFP_NOFS); in btrfs_load_block_group_zone_info()
1319 alloc_offsets = kcalloc(map->num_stripes, sizeof(*alloc_offsets), GFP_NOFS); in btrfs_load_block_group_zone_info()
1325 caps = kcalloc(map->num_stripes, sizeof(*caps), GFP_NOFS); in btrfs_load_block_group_zone_info()
1331 physical = kcalloc(map->num_stripes, sizeof(*physical), GFP_NOFS); in btrfs_load_block_group_zone_info()
1337 active = bitmap_zalloc(map->num_stripes, GFP_NOFS); in btrfs_load_block_group_zone_info()
1343 for (i = 0; i < map->num_stripes; i++) { in btrfs_load_block_group_zone_info()
1450 } else if (map->num_stripes == num_conventional) { in btrfs_load_block_group_zone_info()
1791 nmirrors = (int)bioc->num_stripes; in read_zone_info()
1898 for (i = 0; i < map->num_stripes; i++) { in btrfs_zone_activate()
2041 for (i = 0; i < map->num_stripes; i++) { in do_zone_finish()
Dvolumes.h504 int num_stripes; member
546 int num_stripes; member
616 u32 *num_stripes);
Draid56.h155 return map->num_stripes - btrfs_nr_parity_stripes(map->type); in nr_data_stripes()
Dsuper.c2229 int num_stripes = 1; in btrfs_calc_avail_data_space() local
2258 num_stripes = nr_devices; in btrfs_calc_avail_data_space()
2260 num_stripes = rattr->ncopies; in btrfs_calc_avail_data_space()
2262 num_stripes = 4; in btrfs_calc_avail_data_space()
2306 num_stripes = min(num_stripes, nr_devices); in btrfs_calc_avail_data_space()
2312 avail_space += devices_info[i].max_avail * num_stripes; in btrfs_calc_avail_data_space()
2314 for (j = i + 1 - num_stripes; j <= i; j++) in btrfs_calc_avail_data_space()
Dscrub.c1216 int max_allowed = r->bioc->num_stripes - r->bioc->num_tgtdevs; in scrub_handle_errored_block()
1412 return (int)bioc->num_stripes; in scrub_nr_raid_mirrors()
1525 bioc->num_stripes - in scrub_setup_recheck_block()
2912 stripe_nr = div_u64_rem(stripe_nr, map->num_stripes, &rot); in get_raid56_logic_offset()
2915 stripe_index = rot % map->num_stripes; in get_raid56_logic_offset()
3522 return map->num_stripes / map->sub_stripes * map->stripe_len; in simple_stripe_full_stripe_len()
3532 ASSERT(stripe_index < map->num_stripes); in simple_stripe_get_logical()
3546 ASSERT(stripe_index < map->num_stripes); in simple_stripe_mirror_num()
3798 for (i = 0; i < map->num_stripes; ++i) { in scrub_chunk()
Dextent_map.c370 for (i = 0; i < map->num_stripes; i++) { in extent_map_device_set_bits()
385 for (i = 0; i < map->num_stripes; i++) { in extent_map_device_clear_bits()
Draid56.c915 const unsigned int real_stripes = bioc->num_stripes - bioc->num_tgtdevs; in alloc_rbio()
1033 ASSERT(stripe_nr >= 0 && stripe_nr < rbio->bioc->num_stripes); in rbio_add_io_sector()
1145 for (i = 0; i < bioc->num_stripes; i++) { in bio_get_trace_info()
1368 for (i = 0; i < rbio->bioc->num_stripes; i++) { in find_bio_stripe()
Ddev-replace.c589 for (i = 0; i < map->num_stripes; i++) { in btrfs_finish_block_group_to_copy()
840 for (i = 0; i < map->num_stripes; i++) in btrfs_dev_replace_update_device_in_mapping_tree()
Dblock-group.c1179 num_items = 3 + map->num_stripes; in btrfs_start_trans_remove_block_group()
1889 buf = kcalloc(map->num_stripes, sizeof(u64), GFP_NOFS); in btrfs_rmap_block()
1895 for (i = 0; i < map->num_stripes; i++) { in btrfs_rmap_block()
1913 stripe_nr = stripe_nr * map->num_stripes + i; in btrfs_rmap_block()
2476 for (i = 0; i < map->num_stripes; i++) { in insert_dev_extents()
Dctree.h115 static inline unsigned long btrfs_chunk_item_size(int num_stripes) in btrfs_chunk_item_size() argument
117 BUG_ON(num_stripes == 0); in btrfs_chunk_item_size()
119 sizeof(struct btrfs_stripe) * (num_stripes - 1); in btrfs_chunk_item_size()
1913 BTRFS_SETGET_FUNCS(chunk_num_stripes, struct btrfs_chunk, num_stripes, 16);
1935 num_stripes, 16);
Dextent-tree.c1333 unsigned int num_stripes; in btrfs_discard_extent() local
1337 stripes = btrfs_map_discard(fs_info, cur, &num_bytes, &num_stripes); in btrfs_discard_extent()
1345 for (i = 0; i < num_stripes; i++) { in btrfs_discard_extent()
/fs/btrfs/tests/
Dextent-map-tests.c450 u64 num_stripes; member
473 map = kmalloc(map_lookup_size(test->num_stripes), GFP_KERNEL); in test_rmap_block()
488 map->num_stripes = test->num_stripes; in test_rmap_block()
492 for (i = 0; i < map->num_stripes; i++) { in test_rmap_block()
569 .num_stripes = 2, in btrfs_test_extent_map()
586 .num_stripes = 1, in btrfs_test_extent_map()