Searched refs:devices_info (Results 1 – 2 of 2) sorted by relevance
1975 struct btrfs_device_info *devices_info; in btrfs_calc_avail_data_space() local2000 devices_info = kmalloc_array(nr_devices, sizeof(*devices_info), in btrfs_calc_avail_data_space()2002 if (!devices_info) in btrfs_calc_avail_data_space()2059 devices_info[i].dev = device; in btrfs_calc_avail_data_space()2060 devices_info[i].max_avail = avail_space; in btrfs_calc_avail_data_space()2068 btrfs_descending_sort_devices(devices_info, nr_devices); in btrfs_calc_avail_data_space()2076 if (devices_info[i].max_avail >= min_stripe_size) { in btrfs_calc_avail_data_space()2080 avail_space += devices_info[i].max_avail * num_stripes; in btrfs_calc_avail_data_space()2081 alloc_size = devices_info[i].max_avail; in btrfs_calc_avail_data_space()2083 devices_info[j].max_avail -= alloc_size; in btrfs_calc_avail_data_space()[all …]
4624 struct btrfs_device_info *devices_info = NULL; in __btrfs_alloc_chunk() local4691 devices_info = kcalloc(fs_devices->rw_devices, sizeof(*devices_info), in __btrfs_alloc_chunk()4693 if (!devices_info) in __btrfs_alloc_chunk()4748 devices_info[ndevs].dev_offset = dev_offset; in __btrfs_alloc_chunk()4749 devices_info[ndevs].max_avail = max_avail; in __btrfs_alloc_chunk()4750 devices_info[ndevs].total_avail = total_avail; in __btrfs_alloc_chunk()4751 devices_info[ndevs].dev = device; in __btrfs_alloc_chunk()4758 sort(devices_info, ndevs, sizeof(struct btrfs_device_info), in __btrfs_alloc_chunk()4783 stripe_size = div_u64(devices_info[ndevs - 1].max_avail, dev_stripes); in __btrfs_alloc_chunk()4828 map->stripes[s].dev = devices_info[i].dev; in __btrfs_alloc_chunk()[all …]