Skip to content

Commit

Permalink
block: Add handling for zone append command in blk_complete_request
Browse files Browse the repository at this point in the history
Zone append command needs special handling to update the bi_sector
field in the bio struct with the actual position of the data in the
device. It is stored in __sector field of the request struct.

Fixes: 5581a5d ("block: add completion handler for fast path")
Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Tested-by: Adam Manzanares <a.manzanares@samsung.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20220211093425.43262-2-p.raghav@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Pankaj Raghav authored and Jens Axboe committed Feb 11, 2022
1 parent bf23747 commit a12821d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,10 @@ static void blk_complete_request(struct request *req)

/* Completion has already been traced */
bio_clear_flag(bio, BIO_TRACE_COMPLETION);

if (req_op(req) == REQ_OP_ZONE_APPEND)
bio->bi_iter.bi_sector = req->__sector;

if (!is_flush)
bio_endio(bio);
bio = next;
Expand Down

0 comments on commit a12821d

Please sign in to comment.