linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Suwan Kim <suwan.kim027@gmail.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 13:01:19 -0400	[thread overview]
Message-ID: <20220922130102-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20220922125632-mutt-send-email-mst@kernel.org>

On Thu, Sep 22, 2022 at 12:57:01PM -0400, Michael S. Tsirkin wrote:
> On Thu, Sep 22, 2022 at 11:45:15PM +0900, Suwan Kim wrote:
> > 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>
> 
> Stefan, Paolo, any feedback here?

Oh, Stefan acked. Sorry. Will queue now.


> -- 
> MST


      reply	other threads:[~2022-09-22 17:01 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
2022-09-22 16:56     ` Michael S. Tsirkin
2022-09-22 17:01       ` Michael S. Tsirkin [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=20220922130102-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=acourbot@chromium.org \
    --cc=hch@infradead.org \
    --cc=jasowang@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=pankydev8@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=suwan.kim027@gmail.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).