Re: [PATCH v1 1/1] block: Add handling for zone append command in blk_complete_request

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 11, 2022 at 10:34:25AM +0100, Pankaj Raghav wrote:
> 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: 5581a5ddfe8d ("block: add completion handler for fast path")
> Signed-off-by: Pankaj Raghav <p.raghav@xxxxxxxxxxx>
> ---
>  block/blk-mq.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index 4b868e792ba4..6c2231e52991 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -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;

Nice catch and thanks for including steps to reproduce.

Tested-by: Adam Manzanares <a.manzanares@xxxxxxxxxxx>

> -- 
> 2.25.1
> 



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux