block: Simplify report zones execution
authorDamien Le Moal <damien.lemoal@wdc.com>
Mon, 11 Nov 2019 02:39:24 +0000 (11:39 +0900)
committerJens Axboe <axboe@kernel.dk>
Wed, 13 Nov 2019 02:11:56 +0000 (19:11 -0700)
commitceeb373aa6b9eb75ed3278d4b3ff2318c304e70c
tree30e11bd54ea84778943137d53c5179d85a3736ef
parentc98c3d09fca41323765af0dc7926b150cf29ebff
block: Simplify report zones execution

All kernel users of blkdev_report_zones() as well as applications use
through ioctl(BLKZONEREPORT) expect to potentially get less zone
descriptors than requested. As such, the use of the internal report
zones command execution loop implemented by blk_report_zones() is
not necessary and can even be harmful to performance by causing the
execution of inefficient small zones report command to service the
reminder of a requested zone array.

This patch removes blk_report_zones(), simplifying the code. Also
remove a now incorrect comment in dm_blk_report_zones().

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Javier Gonzalez <javier@javigon.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-zoned.c
drivers/md/dm.c