linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Mike Snitzer <snitzer@redhat.com>, linux-block@vger.kernel.org
Cc: dm-devel@redhat.com, stable@vger.kernel.org,
	Ming Lei <ming.lei@redhat.com>
Subject: Re: [PATCH] blk-mq: consider non-idle request as "inflight" in blk_mq_rq_inflight()
Date: Tue, 7 Jul 2020 09:06:41 -0600	[thread overview]
Message-ID: <dc5f15f0-db7f-eb1b-f504-d29ec5ef8a7e@kernel.dk> (raw)
In-Reply-To: <20200707150433.39480-1-snitzer@redhat.com>

On 7/7/20 9:04 AM, Mike Snitzer wrote:
> From: Ming Lei <ming.lei@redhat.com>
> 
> dm-multipath is the only user of blk_mq_queue_inflight().  When
> dm-multipath calls blk_mq_queue_inflight() to check if it has
> outstanding IO it can get a false negative.  The reason for this is
> blk_mq_rq_inflight() doesn't consider requests that are no longer
> MQ_RQ_IN_FLIGHT but that are now MQ_RQ_COMPLETE (->complete isn't
> called or finished yet) as "inflight".
> 
> This causes request-based dm-multipath's dm_wait_for_completion() to
> return before all outstanding dm-multipath requests have actually
> completed.  This breaks DM multipath's suspend functionality because
> blk-mq requests complete after DM's suspend has finished -- which
> shouldn't happen.
> 
> Fix this by considering any request not in the MQ_RQ_IDLE state
> (so either MQ_RQ_COMPLETE or MQ_RQ_IN_FLIGHT) as "inflight" in
> blk_mq_rq_inflight().

Applied, thanks.

-- 
Jens Axboe


      reply	other threads:[~2020-07-07 15:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-07 15:04 [PATCH] blk-mq: consider non-idle request as "inflight" in blk_mq_rq_inflight() Mike Snitzer
2020-07-07 15:06 ` Jens Axboe [this message]

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=dc5f15f0-db7f-eb1b-f504-d29ec5ef8a7e@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=dm-devel@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=snitzer@redhat.com \
    --cc=stable@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;
as well as URLs for NNTP newsgroup(s).