summaryrefslogtreecommitdiff
path: root/block/qcow2.h
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2013-06-19 13:44:19 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2013-06-24 10:25:17 +0200
commit67af674e478054086f972811dd0a11289afa39a9 (patch)
tree9d1fbd115bc79b44f4ae73345158d623976e06ee /block/qcow2.h
parent6cfcb9b8b91d303ab51b78623f2299b5288d2d51 (diff)
qcow2: Options to enable discard for freed clusters
Deleted snapshots are discarded in the image file by default, discard requests take their default from the -drive discard=... option and other places that free clusters must always be enabled explicitly. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/qcow2.h')
-rw-r--r--block/qcow2.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/block/qcow2.h b/block/qcow2.h
index 64a647938a..6f91b9a016 100644
--- a/block/qcow2.h
+++ b/block/qcow2.h
@@ -60,6 +60,9 @@
#define QCOW2_OPT_LAZY_REFCOUNTS "lazy_refcounts"
+#define QCOW2_OPT_DISCARD_REQUEST "pass_discard_request"
+#define QCOW2_OPT_DISCARD_SNAPSHOT "pass_discard_snapshot"
+#define QCOW2_OPT_DISCARD_OTHER "pass_discard_other"
typedef struct QCowHeader {
uint32_t magic;
@@ -187,6 +190,8 @@ typedef struct BDRVQcowState {
int qcow_version;
bool use_lazy_refcounts;
+ bool discard_passthrough[QCOW2_DISCARD_MAX];
+
uint64_t incompatible_features;
uint64_t compatible_features;
uint64_t autoclear_features;