Searched refs:devices_info (Results 1 – 2 of 2) sorted by relevance
1806 struct btrfs_device_info *devices_info; in btrfs_calc_avail_data_space() local1833 devices_info = kmalloc_array(nr_devices, sizeof(*devices_info), in btrfs_calc_avail_data_space()1835 if (!devices_info) in btrfs_calc_avail_data_space()1897 kfree(devices_info); in btrfs_calc_avail_data_space()1920 devices_info[i].dev = device; in btrfs_calc_avail_data_space()1921 devices_info[i].max_avail = avail_space; in btrfs_calc_avail_data_space()1931 btrfs_descending_sort_devices(devices_info, nr_devices); in btrfs_calc_avail_data_space()1939 if (devices_info[i].max_avail >= min_stripe_size) { in btrfs_calc_avail_data_space()1943 avail_space += devices_info[i].max_avail * num_stripes; in btrfs_calc_avail_data_space()1944 alloc_size = devices_info[i].max_avail; in btrfs_calc_avail_data_space()[all …]
4507 struct btrfs_device_info *devices_info = NULL; in __btrfs_alloc_chunk() local4572 devices_info = kcalloc(fs_devices->rw_devices, sizeof(*devices_info), in __btrfs_alloc_chunk()4574 if (!devices_info) in __btrfs_alloc_chunk()4629 devices_info[ndevs].dev_offset = dev_offset; in __btrfs_alloc_chunk()4630 devices_info[ndevs].max_avail = max_avail; in __btrfs_alloc_chunk()4631 devices_info[ndevs].total_avail = total_avail; in __btrfs_alloc_chunk()4632 devices_info[ndevs].dev = device; in __btrfs_alloc_chunk()4639 sort(devices_info, ndevs, sizeof(struct btrfs_device_info), in __btrfs_alloc_chunk()4659 stripe_size = div_u64(devices_info[ndevs - 1].max_avail, dev_stripes); in __btrfs_alloc_chunk()4695 if (stripe_size > devices_info[ndevs-1].max_avail) in __btrfs_alloc_chunk()[all …]