/openbmc/linux/drivers/md/ |
H A D | dm-zone.c | 22 sector_t sector, unsigned int nr_zones, in dm_blk_do_report_zones() argument 42 nr_zones - args.zone_idx); in dm_blk_do_report_zones() 45 } while (args.zone_idx < nr_zones && in dm_blk_do_report_zones() 57 unsigned int nr_zones, report_zones_cb cb, void *data) in dm_blk_report_zones() argument 70 ret = dm_blk_do_report_zones(md, map, sector, nr_zones, cb, data); in dm_blk_report_zones() 112 struct dm_report_zones_args *args, unsigned int nr_zones) in dm_report_zones() argument 120 return blkdev_report_zones(bdev, sector, nr_zones, in dm_report_zones() 152 md->nr_zones = 0; in dm_cleanup_zoned_dev() 186 disk->conv_zones_bitmap = bitmap_zalloc(disk->nr_zones, in dm_zone_revalidate_cb() 196 disk->seq_zones_wlock = bitmap_zalloc(disk->nr_zones, in dm_zone_revalidate_cb() [all …]
|
H A D | dm-zoned-reclaim.c | 450 unsigned int nr_unmap, nr_zones; in dmz_reclaim_percentage() local 453 nr_zones = nr_cache; in dmz_reclaim_percentage() 456 nr_zones = dmz_nr_rnd_zones(zmd, zrc->dev_idx); in dmz_reclaim_percentage() 461 return nr_unmap * 100 / nr_zones; in dmz_reclaim_percentage()
|
H A D | dm-linear.c | 138 struct dm_report_zones_args *args, unsigned int nr_zones) in linear_report_zones() argument 144 args, nr_zones); in linear_report_zones()
|
H A D | dm-zoned-metadata.c | 164 unsigned int nr_zones; member 265 return zmd->nr_zones; in dmz_nr_zones() 1429 for (idx = 0; idx < dev->nr_zones; idx++) { in dmz_emulate_zones() 1456 for (idx = 0; idx < zmd->nr_zones; idx++) { in dmz_drop_zones() 1486 zmd->nr_zones = 0; in dmz_init_zones() 1491 zmd->nr_zones += dev->nr_zones; in dmz_init_zones() 1502 if (!zmd->nr_zones) { in dmz_init_zones() 1509 zmd->devname, sizeof(struct dm_zone) * zmd->nr_zones); in dmz_init_zones() 1714 if (dzone_id >= zmd->nr_zones) { in dmz_load_mapping() 1742 if (bzone_id >= zmd->nr_zones) { in dmz_load_mapping() [all …]
|
H A D | dm-zoned-target.c | 795 zoned_dev->nr_zones = bdev_nr_zones(bdev); in dmz_fixup_devices() 806 zoned_dev->nr_zones = bdev_nr_zones(bdev); in dmz_fixup_devices() 813 reg_dev->nr_zones = in dmz_fixup_devices() 817 zone_offset = reg_dev->nr_zones; in dmz_fixup_devices() 820 zone_offset += dmz->dev[i].nr_zones; in dmz_fixup_devices()
|
/openbmc/linux/drivers/scsi/ |
H A D | sd_zbc.c | 202 unsigned int nr_zones, size_t *buflen) in sd_zbc_alloc_report_buffer() argument 217 nr_zones = min(nr_zones, sdkp->zone_info.nr_zones); in sd_zbc_alloc_report_buffer() 218 bufsize = roundup((nr_zones + 1) * 64, SECTOR_SIZE); in sd_zbc_alloc_report_buffer() 256 unsigned int nr_zones, report_zones_cb cb, void *data) in sd_zbc_report_zones() argument 275 buf = sd_zbc_alloc_report_buffer(sdkp, nr_zones, &buflen); in sd_zbc_report_zones() 279 while (zone_idx < nr_zones && lba < sdkp->capacity) { in sd_zbc_report_zones() 285 nr = min(nr_zones, get_unaligned_be32(&buf[0]) / 64); in sd_zbc_report_zones() 289 for (i = 0; i < nr && zone_idx < nr_zones; i++) { in sd_zbc_report_zones() 378 for (zno = 0; zno < sdkp->zone_info.nr_zones; zno++) { in sd_zbc_update_wp_offset_workfn() 584 sdkp->zone_info.nr_zones * sizeof(unsigned int)); in sd_zbc_zone_wp_update() [all …]
|
H A D | sd.h | 80 u32 nr_zones; member 253 unsigned int nr_zones, report_zones_cb cb, void *data);
|
/openbmc/linux/drivers/block/null_blk/ |
H A D | trace.h | 57 TP_PROTO(struct nullb *nullb, unsigned int nr_zones), 58 TP_ARGS(nullb, nr_zones), 61 __field(unsigned int, nr_zones) 64 __entry->nr_zones = nr_zones; 68 __print_disk_name(__entry->disk), __entry->nr_zones)
|
H A D | zoned.c | 100 dev->nr_zones = round_up(dev_capacity_sects, dev->zone_size_sects) in null_init_zoned_dev() 103 dev->zones = kvmalloc_array(dev->nr_zones, sizeof(struct nullb_zone), in null_init_zoned_dev() 110 if (dev->zone_nr_conv >= dev->nr_zones) { in null_init_zoned_dev() 111 dev->zone_nr_conv = dev->nr_zones - 1; in null_init_zoned_dev() 117 if (dev->zone_max_active >= dev->nr_zones - dev->zone_nr_conv) { in null_init_zoned_dev() 127 } else if (dev->zone_max_open >= dev->nr_zones - dev->zone_nr_conv) { in null_init_zoned_dev() 148 for (i = dev->zone_nr_conv; i < dev->nr_zones; i++) { in null_init_zoned_dev() 177 nullb->disk->nr_zones = bdev_nr_zones(nullb->disk->part0); in null_register_zoned_dev() 195 unsigned int nr_zones, report_zones_cb cb, void *data) in null_report_zones() argument 205 if (first_zone >= dev->nr_zones) in null_report_zones() [all …]
|
H A D | null_blk.h | 84 unsigned int nr_zones; member 154 unsigned int nr_zones, report_zones_cb cb, void *data);
|
/openbmc/linux/block/ |
H A D | blk-zoned.c | 139 unsigned int nr_zones, report_zones_cb cb, void *data) in blkdev_report_zones() argument 147 if (!nr_zones || sector >= capacity) in blkdev_report_zones() 150 return disk->fops->report_zones(disk, sector, nr_zones, cb, data); in blkdev_report_zones() 155 unsigned int nr_zones) in blk_alloc_zone_bitmap() argument 157 return kcalloc_node(BITS_TO_LONGS(nr_zones), sizeof(unsigned long), in blk_alloc_zone_bitmap() 191 need_reset = blk_alloc_zone_bitmap(disk->queue->node, disk->nr_zones); in blkdev_zone_reset_all_emulated() 195 ret = disk->fops->report_zones(disk, 0, disk->nr_zones, in blkdev_zone_reset_all_emulated() 343 if (!rep.nr_zones) in blkdev_report_zones_ioctl() 347 ret = blkdev_report_zones(bdev, rep.sector, rep.nr_zones, in blkdev_report_zones_ioctl() 352 rep.nr_zones = ret; in blkdev_report_zones_ioctl() [all …]
|
H A D | blk-mq-debugfs-zoned.c | 17 for (i = 0; i < q->disk->nr_zones; i++) in queue_zone_wlock_show()
|
/openbmc/linux/drivers/nvme/host/ |
H A D | zns.c | 121 unsigned int nr_zones, size_t *buflen) in nvme_zns_alloc_report_buffer() argument 130 nr_zones = min_t(unsigned int, nr_zones, in nvme_zns_alloc_report_buffer() 134 nr_zones * sizeof(struct nvme_zone_descriptor); in nvme_zns_alloc_report_buffer() 177 unsigned int nr_zones, report_zones_cb cb, void *data) in nvme_ns_report_zones() argument 188 report = nvme_zns_alloc_report_buffer(ns, nr_zones, &buflen); in nvme_ns_report_zones() 200 while (zone_idx < nr_zones && sector < get_capacity(ns->disk)) { in nvme_ns_report_zones() 211 nz = min((unsigned int)le64_to_cpu(report->nr_zones), nr_zones); in nvme_ns_report_zones() 215 for (i = 0; i < nz && zone_idx < nr_zones; i++) { in nvme_ns_report_zones()
|
/openbmc/linux/fs/btrfs/ |
H A D | zoned.c | 199 struct blk_zone *zones, unsigned int nr_zones) in emulate_report_zones() argument 206 for (i = 0; i < nr_zones; i++) { in emulate_report_zones() 224 struct blk_zone *zones, unsigned int *nr_zones) in btrfs_get_dev_zones() argument 229 if (!*nr_zones) in btrfs_get_dev_zones() 233 ret = emulate_report_zones(device, pos, zones, *nr_zones); in btrfs_get_dev_zones() 234 *nr_zones = ret; in btrfs_get_dev_zones() 249 *nr_zones = min_t(u32, *nr_zones, zinfo->nr_zones - zno); in btrfs_get_dev_zones() 251 for (i = 0; i < *nr_zones; i++) { in btrfs_get_dev_zones() 259 if (i == *nr_zones) { in btrfs_get_dev_zones() 262 sizeof(*zinfo->zone_cache) * *nr_zones); in btrfs_get_dev_zones() [all …]
|
/openbmc/linux/drivers/nvme/target/ |
H A D | zns.c | 210 u64 nr_zones; member 231 if (rz->nr_zones < rz->out_nr_zones) { in nvmet_bdev_report_zone_cb() 250 rz->nr_zones++; in nvmet_bdev_report_zone_cb() 277 __le64 nr_zones; in nvmet_bdev_zone_zmgmt_recv_work() local 285 .nr_zones = 0, in nvmet_bdev_zone_zmgmt_recv_work() 310 rz_data.nr_zones = min(rz_data.nr_zones, rz_data.out_nr_zones); in nvmet_bdev_zone_zmgmt_recv_work() 312 nr_zones = cpu_to_le64(rz_data.nr_zones); in nvmet_bdev_zone_zmgmt_recv_work() 313 status = nvmet_copy_to_sgl(req, 0, &nr_zones, sizeof(nr_zones)); in nvmet_bdev_zone_zmgmt_recv_work() 403 unsigned int nr_zones = bdev_nr_zones(bdev); in nvmet_bdev_zone_mgmt_emulate_all() local 411 d.zbitmap = kcalloc_node(BITS_TO_LONGS(nr_zones), sizeof(*(d.zbitmap)), in nvmet_bdev_zone_mgmt_emulate_all() [all …]
|
/openbmc/linux/drivers/block/ |
H A D | ublk_drv.c | 218 __u32 nr_zones; member 258 int nr_zones; in ublk_dev_param_zoned_validate() local 266 nr_zones = ublk_get_nr_zones(ub); in ublk_dev_param_zoned_validate() 268 if (p->max_active_zones > nr_zones) in ublk_dev_param_zoned_validate() 271 if (p->max_open_zones > nr_zones) in ublk_dev_param_zoned_validate() 289 ub->ub_disk->nr_zones = ublk_get_nr_zones(ub); in ublk_dev_param_zoned_apply() 296 unsigned int nr_zones, size_t *buflen) in ublk_alloc_report_buffer() argument 302 nr_zones = min_t(unsigned int, nr_zones, in ublk_alloc_report_buffer() 303 ublk->ub_disk->nr_zones); in ublk_alloc_report_buffer() 323 ublk_report_zones(struct gendisk * disk,sector_t sector,unsigned int nr_zones,report_zones_cb cb,void * data) ublk_report_zones() argument [all...] |
H A D | virtio_blk.c | 534 unsigned int nr_zones, in virtblk_alloc_report_buffer() argument 541 nr_zones = min_t(unsigned int, nr_zones, in virtblk_alloc_report_buffer() 545 nr_zones * sizeof(struct virtio_blk_zone_descriptor); in virtblk_alloc_report_buffer() 663 unsigned int nr_zones, report_zones_cb cb, in virtblk_report_zones() argument 676 report = virtblk_alloc_report_buffer(vblk, nr_zones, &buflen); in virtblk_report_zones() 687 while (zone_idx < nr_zones && sector < get_capacity(vblk->disk)) { in virtblk_report_zones() 695 nz = min_t(u64, virtio64_to_cpu(vblk->vdev, report->nr_zones), in virtblk_report_zones() 696 nr_zones); in virtblk_report_zones() 700 for (i = 0; i < nz && zone_idx < nr_zones; i++) { in virtblk_report_zones()
|
/openbmc/qemu/include/sysemu/ |
H A D | block-backend-io.h | 50 unsigned int *nr_zones, 194 unsigned int *nr_zones, 197 unsigned int *nr_zones,
|
/openbmc/linux/include/uapi/linux/ |
H A D | blkzoned.h | 131 __u32 nr_zones; member
|
H A D | virtio_blk.h | 257 __virtio64 nr_zones; member
|
/openbmc/qemu/hw/block/ |
H A D | trace-events | 50 …ne_report_complete(void *vdev, void *req, unsigned int nr_zones, int ret) "vdev %p req %p nr_zones… 56 …d *vdev, void *req, int64_t sector, unsigned int nr_zones) "vdev %p req %p sector 0x%" PRIx64 " nr…
|
H A D | virtio-blk.c | 464 unsigned int nr_zones; member 528 int64_t nz = data->zone_report_data.nr_zones; in virtio_blk_zone_report_complete() 531 .nr_zones = cpu_to_le64(nz), in virtio_blk_zone_report_complete() 626 unsigned int nr_zones; in virtio_blk_handle_zone_report() local 644 nr_zones = (req->in_len - sizeof(struct virtio_blk_inhdr) - in virtio_blk_handle_zone_report() 648 offset >> BDRV_SECTOR_BITS, nr_zones); in virtio_blk_handle_zone_report() 650 zone_size = sizeof(BlockZoneDescriptor) * nr_zones; in virtio_blk_handle_zone_report() 655 data->zone_report_data.nr_zones = nr_zones; in virtio_blk_handle_zone_report() 658 blk_aio_zone_report(s->blk, offset, &data->zone_report_data.nr_zones, in virtio_blk_handle_zone_report() 703 len = capacity - bs->bl.zone_size * (bs->bl.nr_zones - 1ull); in virtio_blk_handle_zone_mgmt()
|
/openbmc/qemu/block/ |
H A D | file-posix.c | 224 unsigned int *nr_zones; member 1337 rep->nr_zones = nrz - n; in get_zones_wp() 1348 if (!rep->nr_zones) { in get_zones_wp() 1352 for (i = 0; i < rep->nr_zones; ++i, ++n, ++j) { in get_zones_wp() 1443 bs->bl.nr_zones = ret; in raw_refresh_zoned_limits() 1458 sizeof(int64_t) * bs->bl.nr_zones); in raw_refresh_zoned_limits() 1459 ret = get_zones_wp(bs, s->fd, 0, bs->bl.nr_zones, 0); in raw_refresh_zoned_limits() 2088 unsigned int *nr_zones = aiocb->zone_report.nr_zones; in handle_aiocb_zone_report() local 2099 nrz = *nr_zones; in handle_aiocb_zone_report() 2108 rep->nr_zones = nrz - n; in handle_aiocb_zone_report() [all …]
|
/openbmc/linux/Documentation/block/ |
H A D | null_blk.rst | 151 zone_nr_conv >= nr_zones, it will be reduced to nr_zones - 1.
|
/openbmc/linux/include/linux/ |
H A D | powercap.h | 67 int nr_zones; member
|