public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Cc: Dragan Milenkovic <dragan.milenkovic@pantelija.rs>
Subject: [PATCH] blk-flush: fix inverted scheduler check
Date: Mon, 11 Feb 2019 16:11:40 -0700	[thread overview]
Message-ID: <d52cf5d9-07a0-b643-e775-48139a4b19b0@kernel.dk> (raw)


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

             reply	other threads:[~2019-02-11 23:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-11 23:11 Jens Axboe [this message]
2019-02-12  2:49 ` [PATCH] blk-flush: fix inverted scheduler check Jens Axboe
2019-02-15  4:34 ` Ming Lei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d52cf5d9-07a0-b643-e775-48139a4b19b0@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=dragan.milenkovic@pantelija.rs \
    --cc=linux-block@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox