From: Chuck Lever <chuck.lever@xxxxxxxxxx> Even after commit 9f87fc4d72f5 ("block: queue data commands from the flush state machine at the head"), I'm still seeing hangs on NFS exports that reside on SATA devices. Bisected to commit 615939a2ae73 ("blk-mq: defer to the normal submission path for post-flush requests"). I've tested reverting that commit on several kernels from 0aa69d53ac7c ("Merge tag 'for-6.5/io_uring-2023-06-23' of git://git.kernel.dk/linux") to v6.5-rc5, and it seems to address the problem. I also confirmed that commit 9f87fc4d72f5 ("block: queue data commands from the flush state machine at the head") is still necessary. There is still no root cause. Fixes: 615939a2ae73 ("blk-mq: defer to the normal submission path for post-flush requests") Signed-off-by: Chuck Lever <chuck.lever@xxxxxxxxxx> --- block/blk-flush.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/block/blk-flush.c b/block/blk-flush.c index 8220517c2d67..e4d12f2c344c 100644 --- a/block/blk-flush.c +++ b/block/blk-flush.c @@ -437,17 +437,6 @@ 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