* [PATCH] blk-flush: fix inverted scheduler check
@ 2019-02-11 23:11 Jens Axboe
2019-02-12 2:49 ` Jens Axboe
2019-02-15 4:34 ` Ming Lei
0 siblings, 2 replies; 3+ messages in thread
From: Jens Axboe @ 2019-02-11 23:11 UTC (permalink / raw)
To: linux-block; +Cc: Dragan Milenkovic
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 <dragan.milenkovic@pantelija.rs>
Fixes: 344e9ffcbd18 ("block: add queue_is_mq() helper")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
diff --git a/block/blk-flush.c b/block/blk-flush.c
index 6e0f2d97fc6d..b56f4e5e6359 100644
--- a/block/blk-flush.c
+++ b/block/blk-flush.c
@@ -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;
--
Jens Axboe
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] blk-flush: fix inverted scheduler check
2019-02-11 23:11 [PATCH] blk-flush: fix inverted scheduler check Jens Axboe
@ 2019-02-12 2:49 ` Jens Axboe
2019-02-15 4:34 ` Ming Lei
1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2019-02-12 2:49 UTC (permalink / raw)
To: linux-block; +Cc: Dragan Milenkovic
On 2/11/19 4:11 PM, Jens Axboe wrote:
>
> 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 <dragan.milenkovic@pantelija.rs>
> Fixes: 344e9ffcbd18 ("block: add queue_is_mq() helper")
> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Disregard this one.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] blk-flush: fix inverted scheduler check
2019-02-11 23:11 [PATCH] blk-flush: fix inverted scheduler check Jens Axboe
2019-02-12 2:49 ` Jens Axboe
@ 2019-02-15 4:34 ` Ming Lei
1 sibling, 0 replies; 3+ messages in thread
From: Ming Lei @ 2019-02-15 4:34 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-block, Dragan Milenkovic
On Mon, Feb 11, 2019 at 04:11:40PM -0700, Jens Axboe wrote:
>
> 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 <dragan.milenkovic@pantelija.rs>
> Fixes: 344e9ffcbd18 ("block: add queue_is_mq() helper")
> Signed-off-by: Jens Axboe <axboe@kernel.dk>
>
> ---
>
> diff --git a/block/blk-flush.c b/block/blk-flush.c
> index 6e0f2d97fc6d..b56f4e5e6359 100644
> --- a/block/blk-flush.c
> +++ b/block/blk-flush.c
> @@ -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 <ming.lei@redhat.com>
Thanks,
Ming
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-02-15 4:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-11 23:11 [PATCH] blk-flush: fix inverted scheduler check Jens Axboe
2019-02-12 2:49 ` Jens Axboe
2019-02-15 4:34 ` Ming Lei
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).