Lines Matching refs:ndevs
4244 int ndevs; in __btrfs_alloc_chunk() local
4303 ndevs = 0; in __btrfs_alloc_chunk()
4344 if (ndevs == fs_devices->rw_devices) { in __btrfs_alloc_chunk()
4349 devices_info[ndevs].dev_offset = dev_offset; in __btrfs_alloc_chunk()
4350 devices_info[ndevs].max_avail = max_avail; in __btrfs_alloc_chunk()
4351 devices_info[ndevs].total_avail = total_avail; in __btrfs_alloc_chunk()
4352 devices_info[ndevs].dev = device; in __btrfs_alloc_chunk()
4353 ++ndevs; in __btrfs_alloc_chunk()
4359 sort(devices_info, ndevs, sizeof(struct btrfs_device_info), in __btrfs_alloc_chunk()
4363 ndevs -= ndevs % devs_increment; in __btrfs_alloc_chunk()
4365 if (ndevs < devs_increment * sub_stripes || ndevs < devs_min) { in __btrfs_alloc_chunk()
4370 if (devs_max && ndevs > devs_max) in __btrfs_alloc_chunk()
4371 ndevs = devs_max; in __btrfs_alloc_chunk()
4376 stripe_size = devices_info[ndevs-1].max_avail; in __btrfs_alloc_chunk()
4377 num_stripes = ndevs * dev_stripes; in __btrfs_alloc_chunk()
4386 raid_stripe_len = find_raid56_stripe_len(ndevs - 1, in __btrfs_alloc_chunk()
4391 raid_stripe_len = find_raid56_stripe_len(ndevs - 2, in __btrfs_alloc_chunk()
4412 if (stripe_size > devices_info[ndevs-1].max_avail) in __btrfs_alloc_chunk()
4413 stripe_size = devices_info[ndevs-1].max_avail; in __btrfs_alloc_chunk()
4429 for (i = 0; i < ndevs; ++i) { in __btrfs_alloc_chunk()