Commit b3c72f81 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

block: pass a gendisk to blk_queue_clear_zone_settings

Switch to a gendisk based API in preparation for moving all zone related
fields from the request_queue to the gendisk.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20220706070350.1703384-8-hch@lst.deSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 6b2bd274
...@@ -946,7 +946,7 @@ void disk_set_zoned(struct gendisk *disk, enum blk_zoned_model model) ...@@ -946,7 +946,7 @@ void disk_set_zoned(struct gendisk *disk, enum blk_zoned_model model)
blk_queue_zone_write_granularity(q, blk_queue_zone_write_granularity(q,
queue_logical_block_size(q)); queue_logical_block_size(q));
} else { } else {
blk_queue_clear_zone_settings(q); disk_clear_zone_settings(disk);
} }
} }
EXPORT_SYMBOL_GPL(disk_set_zoned); EXPORT_SYMBOL_GPL(disk_set_zoned);
......
...@@ -622,8 +622,10 @@ int blk_revalidate_disk_zones(struct gendisk *disk, ...@@ -622,8 +622,10 @@ int blk_revalidate_disk_zones(struct gendisk *disk,
} }
EXPORT_SYMBOL_GPL(blk_revalidate_disk_zones); EXPORT_SYMBOL_GPL(blk_revalidate_disk_zones);
void blk_queue_clear_zone_settings(struct request_queue *q) void disk_clear_zone_settings(struct gendisk *disk)
{ {
struct request_queue *q = disk->queue;
blk_mq_freeze_queue(q); blk_mq_freeze_queue(q);
blk_queue_free_zone_bitmaps(q); blk_queue_free_zone_bitmaps(q);
......
...@@ -406,10 +406,10 @@ static inline int blk_iolatency_init(struct request_queue *q) { return 0; } ...@@ -406,10 +406,10 @@ static inline int blk_iolatency_init(struct request_queue *q) { return 0; }
#ifdef CONFIG_BLK_DEV_ZONED #ifdef CONFIG_BLK_DEV_ZONED
void blk_queue_free_zone_bitmaps(struct request_queue *q); void blk_queue_free_zone_bitmaps(struct request_queue *q);
void blk_queue_clear_zone_settings(struct request_queue *q); void disk_clear_zone_settings(struct gendisk *disk);
#else #else
static inline void blk_queue_free_zone_bitmaps(struct request_queue *q) {} static inline void blk_queue_free_zone_bitmaps(struct request_queue *q) {}
static inline void blk_queue_clear_zone_settings(struct request_queue *q) {} static inline void disk_clear_zone_settings(struct gendisk *disk) {}
#endif #endif
int blk_alloc_ext_minor(void); int blk_alloc_ext_minor(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment