From: Stefan Hajnoczi <stefanha@redhat.com>
To: Suwan Kim <suwan.kim027@gmail.com>
Cc: acourbot@chromium.org, mst@redhat.com,
virtualization@lists.linux-foundation.org,
linux-block@vger.kernel.org, pbonzini@redhat.com
Subject: Re: [PATCH] virtio-blk: Fix WARN_ON_ONCE in virtio_queue_rq()
Date: Tue, 23 Aug 2022 16:56:49 -0400 [thread overview]
Message-ID: <YwU/EVxT0a6q2BfD@fedora> (raw)
In-Reply-To: <20220823145005.26356-1-suwan.kim027@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 641 bytes --]
On Tue, Aug 23, 2022 at 11:50:05PM +0900, Suwan Kim wrote:
> @@ -409,6 +409,8 @@ static bool virtblk_add_req_batch(struct virtio_blk_vq *vq,
> virtblk_unmap_data(req, vbr);
> virtblk_cleanup_cmd(req);
> rq_list_add(requeue_list, req);
> + } else {
> + blk_mq_start_request(req);
> }
The device may see new requests as soon as virtblk_add_req() is called
above. Therefore the device may complete the request before
blk_mq_start_request() is called.
rq->io_start_time_ns = ktime_get_ns() will be after the request was
actually submitted.
I think blk_mq_start_request() needs to be called before
virtblk_add_req().
Stefan
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 183 bytes --]
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
next prev parent reply other threads:[~2022-08-23 20:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220823145005.26356-1-suwan.kim027@gmail.com>
2022-08-23 16:39 ` [PATCH] virtio-blk: Fix WARN_ON_ONCE in virtio_queue_rq() Christoph Hellwig
2022-08-23 20:56 ` Stefan Hajnoczi [this message]
[not found] ` <CAFNWusaXc3H78kx1wxUDLht3PuV0A_VxvdmmY-yMJNefvih-1Q@mail.gmail.com>
2022-08-24 17:32 ` Stefan Hajnoczi
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=YwU/EVxT0a6q2BfD@fedora \
--to=stefanha@redhat.com \
--cc=acourbot@chromium.org \
--cc=linux-block@vger.kernel.org \
--cc=mst@redhat.com \
--cc=pbonzini@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