diff options
author | Damien Le Moal <damien.lemoal@wdc.com> | 2021-01-28 13:47:32 +0900 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-02-10 07:44:41 -0700 |
commit | 508aebb805277c541e94ee14daba4191ff02347e (patch) | |
tree | 5dc37ce33ad8e36046994a9d116d9216a72c17ad /block/blk-settings.c | |
parent | 0f1ba5f5d80f84b605e70cf4661cb1a44a3c02a6 (diff) |
block: introduce blk_queue_clear_zone_settings()
Introduce the internal function blk_queue_clear_zone_settings() to
cleanup all limits and resources related to zoned block devices. This
new function is called from blk_queue_set_zoned() when a disk zoned
model is set to BLK_ZONED_NONE. This particular case can happens when a
partition is created on a host-aware scsi disk.
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@edc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-settings.c')
-rw-r--r-- | block/blk-settings.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/blk-settings.c b/block/blk-settings.c index a1e66165adcf..7dd8be314ac6 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -910,6 +910,8 @@ void blk_queue_set_zoned(struct gendisk *disk, enum blk_zoned_model model) */ blk_queue_zone_write_granularity(q, queue_logical_block_size(q)); + } else { + blk_queue_clear_zone_settings(q); } } EXPORT_SYMBOL_GPL(blk_queue_set_zoned); |