Skip to content

Commit a12821d

Browse files
Panky-codesaxboe
authored andcommitted
block: Add handling for zone append command in blk_complete_request
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 <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Tested-by: Adam Manzanares <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent bf23747 commit a12821d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

block/blk-mq.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,10 @@ static void blk_complete_request(struct request *req)
736736

737737
/* Completion has already been traced */
738738
bio_clear_flag(bio, BIO_TRACE_COMPLETION);
739+
740+
if (req_op(req) == REQ_OP_ZONE_APPEND)
741+
bio->bi_iter.bi_sector = req->__sector;
742+
739743
if (!is_flush)
740744
bio_endio(bio);
741745
bio = next;

0 commit comments

Comments
 (0)