Lines Matching refs:nr_devices
2099 size_t nr_devices) in btrfs_descending_sort_devices() argument
2101 sort(devices, nr_devices, sizeof(struct btrfs_device_info), in btrfs_descending_sort_devices()
2119 int i = 0, nr_devices; in btrfs_calc_avail_data_space() local
2126 nr_devices = fs_info->fs_devices->open_devices; in btrfs_calc_avail_data_space()
2127 if (!nr_devices) { in btrfs_calc_avail_data_space()
2129 nr_devices = fs_info->fs_devices->open_devices; in btrfs_calc_avail_data_space()
2130 ASSERT(nr_devices); in btrfs_calc_avail_data_space()
2131 if (!nr_devices) { in btrfs_calc_avail_data_space()
2137 devices_info = kmalloc_array(nr_devices, sizeof(*devices_info), in btrfs_calc_avail_data_space()
2147 num_stripes = nr_devices; in btrfs_calc_avail_data_space()
2168 if (i >= nr_devices) in btrfs_calc_avail_data_space()
2196 nr_devices = i; in btrfs_calc_avail_data_space()
2198 btrfs_descending_sort_devices(devices_info, nr_devices); in btrfs_calc_avail_data_space()
2200 i = nr_devices - 1; in btrfs_calc_avail_data_space()
2202 while (nr_devices >= rattr->devs_min) { in btrfs_calc_avail_data_space()
2203 num_stripes = min(num_stripes, nr_devices); in btrfs_calc_avail_data_space()
2215 nr_devices--; in btrfs_calc_avail_data_space()