Skip to content

Commit 9f87fc4

Browse files
Christoph Hellwigaxboe
authored andcommitted
block: queue data commands from the flush state machine at the head
We used to insert the data commands following a pre-flush to the head of the queue until commit 1e82fad ("blk-mq: do not do head insertions post-pre-flush commands"). Not doing this seems to cause hangs of such commands on NFS workloads when exported from file systems with SATA SSDs. I have no idea why this would starve these workloads, but doing a semantic revert of this patch (which looks quite different due to various other changes) fixes the hangs. Fixes: 1e82fad ("blk-mq: do not do head insertions post-pre-flush commands") Reported-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Tested-by: Chuck Lever <chuck.lever@oracle.com> Link: https://lore.kernel.org/r/20230714143014.11879-1-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 90b4622 commit 9f87fc4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

block/blk-flush.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ static void blk_flush_complete_seq(struct request *rq,
189189
case REQ_FSEQ_DATA:
190190
list_move_tail(&rq->flush.list, &fq->flush_data_in_flight);
191191
spin_lock(&q->requeue_lock);
192-
list_add_tail(&rq->queuelist, &q->flush_list);
192+
list_add(&rq->queuelist, &q->requeue_list);
193193
spin_unlock(&q->requeue_lock);
194194
blk_mq_kick_requeue_list(q);
195195
break;

0 commit comments

Comments
 (0)