aboutsummaryrefslogtreecommitdiff
path: root/block/qcow2.h
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-07-27 09:05:19 +0100
committerKevin Wolf <kwolf@redhat.com>2012-08-06 22:39:14 +0200
commitc61d0004bc37182cae0f92a865ad2f0625762610 (patch)
treee1a72496aff38b75331d2ec30fb810c55ba318a5 /block/qcow2.h
parent0f6d767aa84676a2374d38797f42df4595415369 (diff)
qcow2: introduce dirty bit
This patch adds an incompatible feature bit to mark images that have not been closed cleanly. When a dirty image file is opened a consistency check and repair is performed. Update qemu-iotests 031 and 036 since the extension header size changes when we add feature bit table entries. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/qcow2.h')
-rw-r--r--block/qcow2.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/block/qcow2.h b/block/qcow2.h
index 455b6d7cfe..b5fefc08f7 100644
--- a/block/qcow2.h
+++ b/block/qcow2.h
@@ -110,6 +110,14 @@ enum {
QCOW2_FEAT_TYPE_AUTOCLEAR = 2,
};
+/* Incompatible feature bits */
+enum {
+ QCOW2_INCOMPAT_DIRTY_BITNR = 0,
+ QCOW2_INCOMPAT_DIRTY = 1 << QCOW2_INCOMPAT_DIRTY_BITNR,
+
+ QCOW2_INCOMPAT_MASK = QCOW2_INCOMPAT_DIRTY,
+};
+
typedef struct Qcow2Feature {
uint8_t type;
uint8_t bit;