From: Eric Blake <eblake@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Cc: stefanha@redhat.com, quintela@redhat.com
Subject: Re: [Qemu-devel] [PATCH] block: Add error handling to bdrv_invalidate_cache()
Date: Wed, 12 Mar 2014 09:40:39 -0600 [thread overview]
Message-ID: <53207FF7.8050707@redhat.com> (raw)
In-Reply-To: <1394636459-30712-1-git-send-email-kwolf@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1327 bytes --]
On 03/12/2014 09:00 AM, Kevin Wolf wrote:
> If it returns an error, the migrated VM will not be started, but qemu
> exits with an error message.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> block.c | 28 ++++++++++++++++++++++------
> block/qcow2.c | 22 +++++++++++++++++++---
> block/qed.c | 21 ++++++++++++++++++---
> include/block/block.h | 4 ++--
> include/block/block_int.h | 2 +-
> migration.c | 8 +++++++-
> 6 files changed, 69 insertions(+), 16 deletions(-)
>
> @@ -115,7 +116,12 @@ static void process_incoming_migration_co(void *opaque)
>
> bdrv_clear_incoming_migration_all();
> /* Make sure all file formats flush their mutable metadata */
> - bdrv_invalidate_cache_all();
> + bdrv_invalidate_cache_all(&local_err);
> + if (local_err) {
> + qerror_report_err(local_err);
> + error_free(local_err);
> + exit(EXIT_FAILURE);
Freeing before exit() is wasted cpu cycles, but doesn't hurt the common
case, and keeping the error_free() makes valgrind a bit happier, so I'm
not opposed to leaving it as-is.
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2014-03-12 15:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-12 15:00 [Qemu-devel] [PATCH] block: Add error handling to bdrv_invalidate_cache() Kevin Wolf
2014-03-12 15:40 ` Eric Blake [this message]
2014-03-12 16:22 ` Juan Quintela
2014-03-18 8:57 ` Kevin Wolf
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=53207FF7.8050707@redhat.com \
--to=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.