Re: [PATCH 01/26] block: Restore sector of flush requests

Hannes Reinecke
2024-02-04T11:56:04Z

On 2/2/24 15:30, Damien Le Moal wrote:
> On completion of a flush sequence, blk_flush_restore_request() restores
> the bio of a request to the original submitted BIO. However, the last
> use of the request in the flush sequence may have been for a POSTFLUSH
> which does not have a sector. So make sure to restore the request sector
> using the iter sector of the original BIO. This BIO has not changed yet
> since the completions of the flush sequence intermediate steps use
> requeueing of the request until all steps are completed.
>
> Restoring the request sector ensures that blk_mq_end_request() will see
> a valid sector as originally set when the flush BIO was submitted.
>
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
> ---
> block/blk-flush.c | 1 +
> 1 file changed, 1 insertion(+)
>
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), GF: Ivo Totev, Andrew McDonald,
Werner Knoblich