qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-stable@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2] block: fix bdrv_flush() ordering in bdrv_close()
Date: Wed, 3 Jul 2013 10:34:11 +0200	[thread overview]
Message-ID: <20130703083411.GA17434@stefanha-thinkpad.muc.redhat.com> (raw)
In-Reply-To: <1372772185-10958-1-git-send-email-stefanha@redhat.com>

On Tue, Jul 02, 2013 at 03:36:25PM +0200, Stefan Hajnoczi wrote:
> Since 80ccf93b we flush the block device during close.  The
> bdrv_drain_all() call should come before bdrv_flush() to ensure guest
> write requests have completed.  Otherwise we may miss pending writes
> when flushing.
> 
> Call bdrv_drain_all() again for safety as the final step after
> bdrv_flush().  This should not be necessary but we can be paranoid here
> in case bdrv_flush() left I/O pending.
> 
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
> v2:
>  * Drain after block_job_cancel_sync() [kwolf]
> 
>  block.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan

      parent reply	other threads:[~2013-07-03  8:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-02 13:36 [Qemu-devel] [PATCH v2] block: fix bdrv_flush() ordering in bdrv_close() Stefan Hajnoczi
2013-07-02 13:54 ` Kevin Wolf
2013-07-03  8:34 ` Stefan Hajnoczi [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=20130703083411.GA17434@stefanha-thinkpad.muc.redhat.com \
    --to=stefanha@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.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).