[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 10/29] qed: Remove callback from qed_write_heade
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-block] [PATCH 10/29] qed: Remove callback from qed_write_header() |
Date: |
Thu, 1 Jun 2017 17:59:53 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 31.05.2017 um 14:32 hat Stefan Hajnoczi geschrieben:
> On Fri, May 26, 2017 at 10:21:51PM +0200, Kevin Wolf wrote:
> > static void qed_clear_need_check(void *opaque, int ret)
> > {
> > BDRVQEDState *s = opaque;
> >
> > if (ret) {
> > - qed_unplug_allocating_write_reqs(s);
> > - return;
> > + goto out;
> > }
> >
> > s->header.features &= ~QED_F_NEED_CHECK;
> > - qed_write_header(s, qed_flush_after_clear_need_check, s);
> > + ret = qed_write_header(s);
> > + (void) ret;
> > +
> > + ret = bdrv_flush(s->bs);
> > + (void) ret;
> > +
> > +out:
> > + qed_unplug_allocating_write_reqs(s);
> > }
>
> Should we unplug allocating write reqs before flushing? The async code
> kicks off a flush but doesn't wait for it to complete.
You're right that moving it up would match the old code. Not sure if it
would make much of a difference, though, isn't the request queue drained
in the kernel anyway while doing a flush? But if you prefer, I can
change it.
Kevin
pgp3XhGCB6SRN.pgp
Description: PGP signature
- Re: [Qemu-block] [PATCH 10/29] qed: Remove callback from qed_write_header(),
Kevin Wolf <=