diff options
author | Damien Le Moal <dlemoal@kernel.org> | 2024-05-01 20:09:04 +0900 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-05-01 08:08:43 -0600 |
commit | 347bde9da10f410b8134a82d6096105cad44e1c1 (patch) | |
tree | e6033ddfccf952356eed1804e2fff71f1d83532b /block/blk.h | |
parent | c4c3ffdab2e26780f6f7c9959a473b2c652f4d13 (diff) | |
download | linux-stable-347bde9da10f410b8134a82d6096105cad44e1c1.tar.gz linux-stable-347bde9da10f410b8134a82d6096105cad44e1c1.tar.bz2 linux-stable-347bde9da10f410b8134a82d6096105cad44e1c1.zip |
block: Improve zone write request completion handling
blk_zone_complete_request() must be called to handle the completion of a
zone write request handled with zone write plugging. This function is
called from blk_complete_request(), blk_update_request() and also in
blk_mq_submit_bio() error path. Improve this by moving this function
call into blk_mq_finish_request() as all requests are processed with
this function when they complete as well as when they are freed without
being executed. This also improves blk_update_request() used by scsi
devices as these may repeatedly call this function to handle partial
completions.
To be consistent with this change, blk_zone_complete_request() is
renamed to blk_zone_finish_request() and
blk_zone_write_plug_complete_request() is renamed to
blk_zone_write_plug_finish_request().
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20240501110907.96950-12-dlemoal@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk.h')
-rw-r--r-- | block/blk.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/block/blk.h b/block/blk.h index 8a62b861453c..ee4f782d1496 100644 --- a/block/blk.h +++ b/block/blk.h @@ -453,11 +453,11 @@ static inline void blk_zone_bio_endio(struct bio *bio) blk_zone_write_plug_bio_endio(bio); } -void blk_zone_write_plug_complete_request(struct request *rq); -static inline void blk_zone_complete_request(struct request *rq) +void blk_zone_write_plug_finish_request(struct request *rq); +static inline void blk_zone_finish_request(struct request *rq) { if (rq->rq_flags & RQF_ZONE_WRITE_PLUGGING) - blk_zone_write_plug_complete_request(rq); + blk_zone_write_plug_finish_request(rq); } int blkdev_report_zones_ioctl(struct block_device *bdev, unsigned int cmd, unsigned long arg); @@ -491,7 +491,7 @@ static inline void blk_zone_update_request_bio(struct request *rq, static inline void blk_zone_bio_endio(struct bio *bio) { } -static inline void blk_zone_complete_request(struct request *rq) +static inline void blk_zone_finish_request(struct request *rq) { } static inline int blkdev_report_zones_ioctl(struct block_device *bdev, |