[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 11/16] block: qcow2 image file reopen
From: |
Jeff Cody |
Subject: |
[Qemu-devel] [PATCH v2 11/16] block: qcow2 image file reopen |
Date: |
Thu, 13 Sep 2012 11:49:49 -0400 |
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 <address@hidden>
---
block/qcow2.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/block/qcow2.c b/block/qcow2.c
index 8f183f1..d462093 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -52,6 +52,7 @@ typedef struct {
uint32_t magic;
uint32_t len;
} QCowExtension;
+
#define QCOW2_EXT_MAGIC_END 0
#define QCOW2_EXT_MAGIC_BACKING_FORMAT 0xE2792ACA
#define QCOW2_EXT_MAGIC_FEATURE_TABLE 0x6803f857
@@ -558,6 +559,24 @@ 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, Error **errp)
+{
+ return 0;
+}
+
+static void qcow2_reopen_commit(BDRVReopenState *state)
+{
+ return;
+}
+
+static void qcow2_reopen_abort(BDRVReopenState *state)
+{
+ return;
+}
+
+
static int coroutine_fn qcow2_co_is_allocated(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, int *pnum)
{
@@ -1679,6 +1698,9 @@ static BlockDriver bdrv_qcow2 = {
.bdrv_probe = qcow2_probe,
.bdrv_open = qcow2_open,
.bdrv_close = qcow2_close,
+ .bdrv_reopen_prepare = qcow2_reopen_prepare,
+ .bdrv_reopen_commit = qcow2_reopen_commit,
+ .bdrv_reopen_abort = qcow2_reopen_abort,
.bdrv_create = qcow2_create,
.bdrv_co_is_allocated = qcow2_co_is_allocated,
.bdrv_set_key = qcow2_set_key,
--
1.7.11.4
- [Qemu-devel] [PATCH v2 09/16] block: raw image file reopen, (continued)
[Qemu-devel] [PATCH v2 08/16] block: raw-posix image file reopen, Jeff Cody, 2012/09/13
[Qemu-devel] [PATCH v2 07/16] block: move allocating aligned_buf into a helper function in raw_posix.c, Jeff Cody, 2012/09/13
[Qemu-devel] [PATCH v2 11/16] block: qcow2 image file reopen,
Jeff Cody <=
[Qemu-devel] [PATCH v2 16/16] block: remove keep_read_only flag from BlockDriverState struct, Jeff Cody, 2012/09/13
[Qemu-devel] [PATCH v2 05/16] block: move open flag parsing in raw block drivers to helper functions, Jeff Cody, 2012/09/13
[Qemu-devel] [PATCH v2 15/16] block: convert bdrv_commit() to use bdrv_reopen(), Jeff Cody, 2012/09/13
[Qemu-devel] [PATCH v2 14/16] block: raw-win32 driver reopen support, Jeff Cody, 2012/09/13
[Qemu-devel] [PATCH v2 12/16] block: qcow image file reopen, Jeff Cody, 2012/09/13
[Qemu-devel] [PATCH v2 13/16] block: vmdk image file reopen, Jeff Cody, 2012/09/13