OSDN Git Service

block: Improve blk_revalidate_disk_zones() checks
authorDamien Le Moal <damien.lemoal@wdc.com>
Wed, 11 Nov 2020 07:36:06 +0000 (16:36 +0900)
committerJens Axboe <axboe@kernel.dk>
Tue, 8 Dec 2020 00:34:21 +0000 (17:34 -0700)
commit2afdeb23e4750acb4ff16fd86f566c9074708691
treeaff92d89b60e3c2e844d7dacc29049f216a0acf3
parent0eff1f1a38a95b20fec83d0b69409c8da967fe1e
block: Improve blk_revalidate_disk_zones() checks

Improves the checks on the zones of a zoned block device done in
blk_revalidate_disk_zones() by making sure that the device report_zones
method did report at least one zone and that the zones reported exactly
cover the entire disk capacity, that is, that there are no missing zones
at the end of the disk sector range.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-zoned.c