diff options
author | Christoph Hellwig <hch@lst.de> | 2019-11-11 05:39:30 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-11-13 05:12:07 +0300 |
commit | d41003513e61dd9d4974cb441d30b63650b85654 (patch) | |
tree | c55164e7ccf02f6e7e936757ed178b06109fcca2 /drivers/block/null_blk.h | |
parent | 23a50861adda26a3f3b3ec5fbca0583133d89538 (diff) | |
download | linux-d41003513e61dd9d4974cb441d30b63650b85654.tar.xz |
block: rework zone reporting
Avoid the need to allocate a potentially large array of struct blk_zone
in the block layer by switching the ->report_zones method interface to
a callback model. Now the caller simply supplies a callback that is
executed on each reported zone, and private data for it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/null_blk.h')
-rw-r--r-- | drivers/block/null_blk.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/null_blk.h b/drivers/block/null_blk.h index 9bf56fbab091..bc837862b767 100644 --- a/drivers/block/null_blk.h +++ b/drivers/block/null_blk.h @@ -92,7 +92,7 @@ struct nullb { int null_zone_init(struct nullb_device *dev); void null_zone_exit(struct nullb_device *dev); int null_report_zones(struct gendisk *disk, sector_t sector, - struct blk_zone *zones, unsigned int *nr_zones); + unsigned int nr_zones, report_zones_cb cb, void *data); blk_status_t null_handle_zoned(struct nullb_cmd *cmd, enum req_opf op, sector_t sector, sector_t nr_sectors); |