blk-flush: fix inverted scheduler check
Jens Axboe
maintainerPATCH 1/1 blk-flush: fix inverted scheduler check
A previous commit inadvertently inverted a check for whether or not we have an IO scheduler attached. This is reported to cause a hang with particular LVM setups.
Fixup the condition.
Reported-by Dragan Milenkovic <[email protected]>
Fixes 344e9ffcbd18 ("block: add queue_is_mq() helper")
Signed-off-by Jens Axboe <[email protected]>
---
block/blk-flush.c +1 -1
@@ -273,7 +273,7 @@ static void blk_kick_flush(struct request_queue *q, struct blk_flush_queue *fq,* assigned to empty flushes, and we deadlock if we are expecting * other requests to make progress. Don't defer for that case. */ -if (!list_empty (&fq->flush_data_in_flight) && q->elevator && +if (!list_empty (&fq->flush_data_in_flight) && !q->elevator &&time_before (jiffies, fq->flush_pending_since +FLUSH_PENDING_TIMEOUT ))return ;
Signature · 1 line
Jens Axboe
Jens Axboe
maintainerQuoted 10 lines · Jens Axboe
A previous commit inadvertently inverted a check for whether or not we have an IO scheduler attached. This is reported to cause a hang with particular LVM setups.
Fixup the condition.
Reported-by Dragan Milenkovic <[email protected]>Fixes 344e9ffcbd18 ("block: add queue_is_mq() helper")Signed-off-by Jens Axboe <[email protected]>
Disregard this one.
Signature · 1 line
Jens Axboe
Quoted 18 lines · Jens Axboe
A previous commit inadvertently inverted a check for whether or not we have an IO scheduler attached. This is reported to cause a hang with particular LVM setups.
Fixup the condition.
Reported-by Dragan Milenkovic <[email protected]>Fixes 344e9ffcbd18 ("block: add queue_is_mq() helper")Signed-off-by Jens Axboe <[email protected]>---
block/blk-flush.c +0
-0
block/blk-flush.c static void blk_kick_flush(struct request_queue *q, struct blk_flush_queue *fq, · line 279
Quoted 8 lines
block/blk-flush.c +1
-1@@ -273,7 +273,7 @@ static void blk_kick_flush(struct request_queue *q, struct blk_flush_queue *fq,* assigned to empty flushes, and we deadlock if we are expecting * other requests to make progress. Don't defer for that case. */ -if (!list_empty (&fq->flush_data_in_flight) && q->elevator && +if (!list_empty (&fq->flush_data_in_flight) && !q->elevator &&time_before (jiffies, fq->flush_pending_since +FLUSH_PENDING_TIMEOUT ))return ;
Reviewed-by Ming Lei <[email protected]>
Thanks,
Ming