From: Bart Van Assche Date: Tue, 17 Dec 2024 21:03:09 +0000 (-0800) Subject: blk-zoned: Improve the queue reference count strategy documentation X-Git-Tag: v6.14-rc1~202^2~51 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fa8555630b32da7c239a1e01e9eb1bb040be59ac;p=thirdparty%2Flinux.git blk-zoned: Improve the queue reference count strategy documentation For the blk_queue_exit() calls, document where the corresponding code can be found that increases q->q_usage_counter. Reviewed-by: Christoph Hellwig Reviewed-by: Damien Le Moal Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20241217210310.645966-4-bvanassche@acm.org Signed-off-by: Jens Axboe --- diff --git a/block/blk-zoned.c b/block/blk-zoned.c index 954724a2e3c65..7876a64580225 100644 --- a/block/blk-zoned.c +++ b/block/blk-zoned.c @@ -582,6 +582,7 @@ static inline void blk_zone_wplug_bio_io_error(struct blk_zone_wplug *zwplug, bio_clear_flag(bio, BIO_ZONE_WRITE_PLUGGING); bio_io_error(bio); disk_put_zone_wplug(zwplug); + /* Drop the reference taken by disk_zone_wplug_add_bio(() */ blk_queue_exit(q); } @@ -893,10 +894,7 @@ void blk_zone_write_plug_init_request(struct request *req) break; } - /* - * Drop the extra reference on the queue usage we got when - * plugging the BIO and advance the write pointer offset. - */ + /* Drop the reference taken by disk_zone_wplug_add_bio(). */ blk_queue_exit(q); zwplug->wp_offset += bio_sectors(bio);