diff options
author | Christoph Hellwig <hch@lst.de> | 2022-07-06 09:03:42 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-07-06 06:46:26 -0600 |
commit | 5d40066567a73a67ddb656ad118c6cfa1c4a6d71 (patch) | |
tree | 20e4a714b16a439df085e7b122f12838a9793f14 /block/blk-zoned.c | |
parent | b3c72f8138b5f967a9fa527af84b35018897aba3 (diff) | |
download | linux-5d40066567a73a67ddb656ad118c6cfa1c4a6d71.tar.gz linux-5d40066567a73a67ddb656ad118c6cfa1c4a6d71.tar.bz2 linux-5d40066567a73a67ddb656ad118c6cfa1c4a6d71.zip |
block: pass a gendisk to blk_queue_free_zone_bitmaps
Switch to a gendisk based API in preparation for moving all zone related
fields from the request_queue to the gendisk.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20220706070350.1703384-9-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-zoned.c')
-rw-r--r-- | block/blk-zoned.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/block/blk-zoned.c b/block/blk-zoned.c index 82a4fa89678c..0d431394cf90 100644 --- a/block/blk-zoned.c +++ b/block/blk-zoned.c @@ -449,8 +449,10 @@ fail: return ret; } -void blk_queue_free_zone_bitmaps(struct request_queue *q) +void disk_free_zone_bitmaps(struct gendisk *disk) { + struct request_queue *q = disk->queue; + kfree(q->conv_zones_bitmap); q->conv_zones_bitmap = NULL; kfree(q->seq_zones_wlock); @@ -612,7 +614,7 @@ int blk_revalidate_disk_zones(struct gendisk *disk, ret = 0; } else { pr_warn("%s: failed to revalidate zones\n", disk->disk_name); - blk_queue_free_zone_bitmaps(q); + disk_free_zone_bitmaps(disk); } blk_mq_unfreeze_queue(q); @@ -628,7 +630,7 @@ void disk_clear_zone_settings(struct gendisk *disk) blk_mq_freeze_queue(q); - blk_queue_free_zone_bitmaps(q); + disk_free_zone_bitmaps(disk); blk_queue_flag_clear(QUEUE_FLAG_ZONE_RESETALL, q); q->required_elevator_features &= ~ELEVATOR_F_ZBD_SEQ_WRITE; q->nr_zones = 0; |