Lines Matching refs:ndevs
4512 int ndevs; in __btrfs_alloc_chunk() local
4571 ndevs = 0; in __btrfs_alloc_chunk()
4612 if (ndevs == fs_devices->rw_devices) { in __btrfs_alloc_chunk()
4617 devices_info[ndevs].dev_offset = dev_offset; in __btrfs_alloc_chunk()
4618 devices_info[ndevs].max_avail = max_avail; in __btrfs_alloc_chunk()
4619 devices_info[ndevs].total_avail = total_avail; in __btrfs_alloc_chunk()
4620 devices_info[ndevs].dev = device; in __btrfs_alloc_chunk()
4621 ++ndevs; in __btrfs_alloc_chunk()
4627 sort(devices_info, ndevs, sizeof(struct btrfs_device_info), in __btrfs_alloc_chunk()
4631 ndevs -= ndevs % devs_increment; in __btrfs_alloc_chunk()
4633 if (ndevs < devs_increment * sub_stripes || ndevs < devs_min) { in __btrfs_alloc_chunk()
4638 if (devs_max && ndevs > devs_max) in __btrfs_alloc_chunk()
4639 ndevs = devs_max; in __btrfs_alloc_chunk()
4644 stripe_size = devices_info[ndevs-1].max_avail; in __btrfs_alloc_chunk()
4645 num_stripes = ndevs * dev_stripes; in __btrfs_alloc_chunk()
4654 raid_stripe_len = find_raid56_stripe_len(ndevs - 1, in __btrfs_alloc_chunk()
4659 raid_stripe_len = find_raid56_stripe_len(ndevs - 2, in __btrfs_alloc_chunk()
4680 if (stripe_size > devices_info[ndevs-1].max_avail) in __btrfs_alloc_chunk()
4681 stripe_size = devices_info[ndevs-1].max_avail; in __btrfs_alloc_chunk()
4697 for (i = 0; i < ndevs; ++i) { in __btrfs_alloc_chunk()