From: Fam Zheng <famz@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, jsnow@redhat.com,
mreitz@redhat.com, stefanha@redhat.com
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] macio: Use blk_drain instead of blk_drain_all
Date: Tue, 14 Jun 2016 09:20:46 +0800 [thread overview]
Message-ID: <20160614012046.GA26269@ad.usersys.redhat.com> (raw)
In-Reply-To: <20160613093948.GB5968@noname.str.redhat.com>
On Mon, 06/13 11:39, Kevin Wolf wrote:
> Am 12.06.2016 um 08:56 hat Fam Zheng geschrieben:
> > We only care about the associated backend, so blk_drain is more
> > appropriate here.
> >
> > Signed-off-by: Fam Zheng <famz@redhat.com>
>
> [ Cc: John ]
>
> > ---
> > hw/ide/macio.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/hw/ide/macio.c b/hw/ide/macio.c
> > index 78c10a0..a8c7321 100644
> > --- a/hw/ide/macio.c
> > +++ b/hw/ide/macio.c
> > @@ -400,7 +400,7 @@ static void pmac_ide_flush(DBDMA_io *io)
> > IDEState *s = idebus_active_if(&m->bus);
> >
> > if (s->bus->dma->aiocb) {
> > - blk_drain_all();
> > + blk_drain(s->blk);
> > }
> > }
>
> Looks good to me:
>
> Reviewed-by: Kevin Wolf <kwolf@redhat.com>
>
> However, even this is still doing too much. We only need to drain the
> requests that come from this device and can ignore e.g. block job
> requests.
>
> Now the part that I'm not completely sure about is whether the problem
> is here in the IDE emulation and it should track its own requests or
> whether it is blk_drain() that actually shouldn't drain the BDS but just
> all requests that came in through this specific BB.
>
> I'm leaning towards the latter, but I'm unsure whether we have cases
> where we actually need to drain the whole root BDS. Any opinions?
I agree with you and think the latter is better in this case. I think the one
in migration/block.c need to drain the whole root BDS, and others don't.
Fam
next prev parent reply other threads:[~2016-06-14 1:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-12 6:56 [Qemu-devel] [PATCH] macio: Use blk_drain instead of blk_drain_all Fam Zheng
2016-06-13 9:39 ` [Qemu-devel] [Qemu-block] " Kevin Wolf
2016-06-14 1:20 ` Fam Zheng [this message]
2016-06-14 9:08 ` Stefan Hajnoczi
2016-06-13 21:33 ` [Qemu-devel] " John Snow
2016-06-14 1:21 ` Fam Zheng
2016-06-14 20:26 ` John Snow
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=20160614012046.GA26269@ad.usersys.redhat.com \
--to=famz@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--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).