summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorDamien Le Moal <damien.lemoal@wdc.com>2019-11-11 11:39:24 +0900
committerJens Axboe <axboe@kernel.dk>2019-11-12 19:11:56 -0700
commitceeb373aa6b9eb75ed3278d4b3ff2318c304e70c (patch)
tree30e11bd54ea84778943137d53c5179d85a3736ef /drivers/md
parentc98c3d09fca41323765af0dc7926b150cf29ebff (diff)
downloadlinux-ceeb373aa6b9eb75ed3278d4b3ff2318c304e70c.tar.bz2
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>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index bc143c1b2333..89189c29438f 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -473,12 +473,6 @@ static int dm_blk_report_zones(struct gendisk *disk, sector_t sector,
goto out;
}
- /*
- * blkdev_report_zones() will loop and call this again to cover all the
- * zones of the target, eventually moving on to the next target.
- * So there is no need to loop here trying to fill the entire array
- * of zones.
- */
ret = tgt->type->report_zones(tgt, sector, zones, nr_zones);
out: