From bff025eff5fd8321891313684d61316890c3b75a Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: References: From: Jeffrey Cody Date: Wed, 17 Oct 2012 05:59:34 +0200 Subject: [PATCH 21/35] block: qcow2 image file reopen RH-Author: Jeffrey Cody Message-id: <9b007f3a03b4bc43659f43ea882f286f5c745599.1350447475.git.jcody@redhat.com> Patchwork-id: 43282 O-Subject: [RHEL6.4 qemu-kvm PATCH v4 21/35] block: qcow2 image file reopen Bugzilla: 767233 RH-Acked-by: Paolo Bonzini RH-Acked-by: Eric Blake RH-Acked-by: Kevin Wolf These are the stubs for the file reopen drivers for the qcow2 format. There is currently nothing that needs to be done by the qcow2 driver in reopen. Signed-off-by: Jeff Cody Signed-off-by: Kevin Wolf (cherry picked from commit 21d82ac95f67947ebc32ada96184f00831a9b911) --- block/qcow2.c | 10 ++++++++++ 1 file changed, 10 insertions(+) Signed-off-by: Michal Novotny --- block/qcow2.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/block/qcow2.c b/block/qcow2.c index 4a16f7e..cd44d98 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -51,6 +51,7 @@ typedef struct { uint32_t magic; uint32_t len; } QCowExtension; + #define QCOW2_EXT_MAGIC_END 0 #define QCOW2_EXT_MAGIC_BACKING_FORMAT 0xE2792ACA @@ -367,6 +368,14 @@ static int qcow2_set_key(BlockDriverState *bs, const char *key) return 0; } +/* We have nothing to do for QCOW2 reopen, stubs just return + * success */ +static int qcow2_reopen_prepare(BDRVReopenState *state, + BlockReopenQueue *queue, Error **errp) +{ + return 0; +} + static int coroutine_fn qcow2_co_is_allocated(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum) { @@ -1436,6 +1445,7 @@ static BlockDriver bdrv_qcow2 = { .bdrv_probe = qcow2_probe, .bdrv_open = qcow2_open, .bdrv_close = qcow2_close, + .bdrv_reopen_prepare = qcow2_reopen_prepare, .bdrv_create = qcow2_create, .bdrv_co_is_allocated = qcow2_co_is_allocated, .bdrv_set_key = qcow2_set_key, -- 1.7.11.7