mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 17:25:38 +00:00
blk-mq: defer to the normal submission path for post-flush requests
Requests with the FUA bit on hardware without FUA support need a post flush before returning to the caller, but they can still be sent using the normal I/O path after initializing the flush-related fields and end I/O handler. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20230519044050.107790-6-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
be4c427809
commit
615939a2ae
@ -432,6 +432,17 @@ bool blk_insert_flush(struct request *rq)
|
||||
* Queue for normal execution.
|
||||
*/
|
||||
return false;
|
||||
case REQ_FSEQ_DATA | REQ_FSEQ_POSTFLUSH:
|
||||
/*
|
||||
* Initialize the flush fields and completion handler to trigger
|
||||
* the post flush, and then just pass the command on.
|
||||
*/
|
||||
blk_rq_init_flush(rq);
|
||||
rq->flush.seq |= REQ_FSEQ_POSTFLUSH;
|
||||
spin_lock_irq(&fq->mq_flush_lock);
|
||||
list_move_tail(&rq->flush.list, &fq->flush_data_in_flight);
|
||||
spin_unlock_irq(&fq->mq_flush_lock);
|
||||
return false;
|
||||
default:
|
||||
/*
|
||||
* Mark the request as part of a flush sequence and submit it
|
||||
|
Loading…
Reference in New Issue
Block a user