diff options
author | Kevin Wolf <kwolf@redhat.com> | 2014-03-12 15:59:16 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-03-19 09:39:41 +0100 |
commit | 5a8a30db4771675480829d7d3bf35a138e9c35f1 (patch) | |
tree | f9ea39c07db48ca7edd89c462e45a2451682014e /block/quorum.c | |
parent | 059b3527f0229f4d60fd77a317503d42abd5e50f (diff) |
block: Add error handling to bdrv_invalidate_cache()
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>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Diffstat (limited to 'block/quorum.c')
-rw-r--r-- | block/quorum.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/block/quorum.c b/block/quorum.c index 33bf2ae6a7..7f580a83b5 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -625,13 +625,18 @@ static int64_t quorum_getlength(BlockDriverState *bs) return result; } -static void quorum_invalidate_cache(BlockDriverState *bs) +static void quorum_invalidate_cache(BlockDriverState *bs, Error **errp) { BDRVQuorumState *s = bs->opaque; + Error *local_err = NULL; int i; for (i = 0; i < s->num_children; i++) { - bdrv_invalidate_cache(s->bs[i]); + bdrv_invalidate_cache(s->bs[i], &local_err); + if (local_err) { + error_propagate(errp, local_err); + return; + } } } |