From: Fam Zheng <famz@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Laszlo Ersek <lersek@redhat.com>,
qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 1/2] virtio-blk: Release s->rq queue at system_reset
Date: Wed, 3 Aug 2016 08:52:42 +0800 [thread overview]
Message-ID: <20160803005242.GB8117@ad.usersys.redhat.com> (raw)
In-Reply-To: <891632335.13100661.1470157235734.JavaMail.zimbra@redhat.com>
On Tue, 08/02 13:00, Paolo Bonzini wrote:
>
> > I'd prefer if Paolo's remark (about blk_drain()'s ability to produce
> > more failed requests, stashed in s->rq) were captured in either the
> > commit message, or in a code comment. Something like:
> >
> > /* We drop queued requests after blk_drain() because blk_drain()
> > * itself can produce them. */
>
> It's also (perhaps especially) because blk_drain() can consume them. Fam's
> patch to do blk_drain() first would cause a double-free.
That "consume" part is what I don't understand.
Shouldn't blk_drain() only process submitted requests (and further requests
they dequeue indirectly), while s->rq only contains failed requests. They don't
look overlap, because I suppose failed requests are only going to be processed
by run state change.
What am I missing?
Fam
next prev parent reply other threads:[~2016-08-03 0:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-02 13:00 [Qemu-devel] [PATCH v2 0/2] Two virtio-blk fixes Fam Zheng
2016-08-02 13:00 ` [Qemu-devel] [PATCH v2 1/2] virtio-blk: Release s->rq queue at system_reset Fam Zheng
2016-08-02 13:31 ` Laszlo Ersek
2016-08-02 17:00 ` Paolo Bonzini
2016-08-03 0:52 ` Fam Zheng [this message]
2016-08-04 12:42 ` Paolo Bonzini
2016-08-02 13:00 ` [Qemu-devel] [PATCH v2 2/2] virtio-blk: Remove stale comment about draining Fam Zheng
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=20160803005242.GB8117@ad.usersys.redhat.com \
--to=famz@redhat.com \
--cc=lersek@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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).