linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Suwan Kim <suwan.kim027@gmail.com>
To: mst@redhat.com
Cc: Pankaj Raghav <pankydev8@gmail.com>,
	jasowang@redhat.com, pbonzini@redhat.com, stefanha@redhat.com,
	acourbot@chromium.org, hch@infradead.org,
	linux-block@vger.kernel.org,
	virtualization@lists.linux-foundation.org
Subject: Re: [PATCH v2] virtio-blk: Fix WARN_ON_ONCE in virtio_queue_rq()
Date: Thu, 22 Sep 2022 23:45:15 +0900	[thread overview]
Message-ID: <CAFNWusaxT38RyQBFZu6jN_kaL3p3hTQ0oXPQZkZdEJ3VjUMVWg@mail.gmail.com> (raw)
In-Reply-To: <20220831124441.ai5xratdpemiqmyv@quentin>

Hi Michael,

Can this patch be merged to the next rc?
We received two bug reports about this issue and need to fix it.

Regards,
Suwan Kim


On Wed, Aug 31, 2022 at 9:44 PM Pankaj Raghav <pankydev8@gmail.com> wrote:
>
> On Wed, Aug 31, 2022 at 12:01:53AM +0900, Suwan Kim wrote:
> > If a request fails at virtio_queue_rqs(), it is inserted to requeue_list
> > and passed to virtio_queue_rq(). Then blk_mq_start_request() can be called
> > again at virtio_queue_rq() and trigger WARN_ON_ONCE like below trace because
> > request state was already set to MQ_RQ_IN_FLIGHT in virtio_queue_rqs()
> > despite the failure.
> >
> > To avoid calling blk_mq_start_request() twice, This patch moves the
> > execution of blk_mq_start_request() to the end of virtblk_prep_rq().
> > And instead of requeuing failed request to plug list in the error path of
> > virtblk_add_req_batch(), it uses blk_mq_requeue_request() to change failed
> > request state to MQ_RQ_IDLE. Then virtblk can safely handle the request
> > on the next trial.
> >
> > Fixes: 0e9911fa768f ("virtio-blk: support mq_ops->queue_rqs()")
> > Reported-by: Alexandre Courbot <acourbot@chromium.org>
> > Tested-by: Alexandre Courbot <acourbot@chromium.org>
> > Signed-off-by: Suwan Kim <suwan.kim027@gmail.com>
> > ---
> Looks good.
> Reviewed-by: Pankaj Raghav <p.raghav@samsung.com>

  reply	other threads:[~2022-09-22 14:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-30 15:01 [PATCH v2] virtio-blk: Fix WARN_ON_ONCE in virtio_queue_rq() Suwan Kim
2022-08-30 20:02 ` Stefan Hajnoczi
2022-08-31 12:44 ` Pankaj Raghav
2022-09-22 14:45   ` Suwan Kim [this message]
2022-09-22 16:56     ` Michael S. Tsirkin
2022-09-22 17:01       ` Michael S. Tsirkin

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=CAFNWusaxT38RyQBFZu6jN_kaL3p3hTQ0oXPQZkZdEJ3VjUMVWg@mail.gmail.com \
    --to=suwan.kim027@gmail.com \
    --cc=acourbot@chromium.org \
    --cc=hch@infradead.org \
    --cc=jasowang@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=pankydev8@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=virtualization@lists.linux-foundation.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).