Lines Matching refs:nr_zones
189 struct blk_zone *zones, unsigned int nr_zones) in emulate_report_zones() argument
196 for (i = 0; i < nr_zones; i++) { in emulate_report_zones()
214 struct blk_zone *zones, unsigned int *nr_zones) in btrfs_get_dev_zones() argument
218 if (!*nr_zones) in btrfs_get_dev_zones()
222 ret = emulate_report_zones(device, pos, zones, *nr_zones); in btrfs_get_dev_zones()
223 *nr_zones = ret; in btrfs_get_dev_zones()
227 ret = blkdev_report_zones(device->bdev, pos >> SECTOR_SHIFT, *nr_zones, in btrfs_get_dev_zones()
236 *nr_zones = ret; in btrfs_get_dev_zones()
323 unsigned int i, nreported = 0, nr_zones; in btrfs_get_dev_zone_info() local
371 zone_info->nr_zones = nr_sectors >> ilog2(zone_sectors); in btrfs_get_dev_zone_info()
373 zone_info->nr_zones++; in btrfs_get_dev_zone_info()
386 zone_info->seq_zones = bitmap_zalloc(zone_info->nr_zones, GFP_KERNEL); in btrfs_get_dev_zone_info()
392 zone_info->empty_zones = bitmap_zalloc(zone_info->nr_zones, GFP_KERNEL); in btrfs_get_dev_zone_info()
398 zone_info->active_zones = bitmap_zalloc(zone_info->nr_zones, GFP_KERNEL); in btrfs_get_dev_zone_info()
413 nr_zones = BTRFS_REPORT_NR_ZONES; in btrfs_get_dev_zone_info()
415 &nr_zones); in btrfs_get_dev_zone_info()
419 for (i = 0; i < nr_zones; i++) { in btrfs_get_dev_zone_info()
435 sector = zones[nr_zones - 1].start + zones[nr_zones - 1].len; in btrfs_get_dev_zone_info()
438 if (nreported != zone_info->nr_zones) { in btrfs_get_dev_zone_info()
442 zone_info->nr_zones); in btrfs_get_dev_zone_info()
461 nr_zones = BTRFS_NR_SB_LOG_ZONES; in btrfs_get_dev_zone_info()
468 if (sb_zone + 1 >= zone_info->nr_zones) in btrfs_get_dev_zone_info()
474 &nr_zones); in btrfs_get_dev_zone_info()
478 if (nr_zones != BTRFS_NR_SB_LOG_ZONES) { in btrfs_get_dev_zone_info()
534 model, rcu_str_deref(device->name), zone_info->nr_zones, in btrfs_get_dev_zone_info()
568 unsigned int nr_zones = 1; in btrfs_get_dev_zone() local
571 ret = btrfs_get_dev_zones(device, pos, zone, &nr_zones); in btrfs_get_dev_zone()
572 if (ret != 0 || !nr_zones) in btrfs_get_dev_zone()
773 u32 nr_zones; in btrfs_sb_log_location_bdev() local
787 nr_zones = nr_sectors >> zone_sectors_shift; in btrfs_sb_log_location_bdev()
790 if (sb_zone + 1 >= nr_zones) in btrfs_sb_log_location_bdev()
822 if (zone_num + 1 >= zinfo->nr_zones) in btrfs_sb_log_location()
839 if (zone_num + 1 >= zinfo->nr_zones) in is_sb_log_zone()
906 u32 nr_zones; in btrfs_reset_sb_log_zones() local
911 nr_zones = nr_sectors >> zone_sectors_shift; in btrfs_reset_sb_log_zones()
914 if (sb_zone + 1 >= nr_zones) in btrfs_reset_sb_log_zones()
951 if (end > zinfo->nr_zones) in btrfs_find_allocatable_zones()
1062 if (end > zinfo->nr_zones) in btrfs_ensure_empty_zones()