aboutsummaryrefslogtreecommitdiff
path: root/qapi/block-core.json
diff options
context:
space:
mode:
authorHu Tao <hutao@cn.fujitsu.com>2014-09-10 17:05:47 +0800
committerKevin Wolf <kwolf@redhat.com>2014-09-12 15:43:06 +0200
commitffeaac9b4e23a3033e8120cc34bacadc09487f1b (patch)
tree1c76d91db7c14d786f21f10494aa3dbb3a1510dd /qapi/block-core.json
parent180e95265e87edcb457a9f92f844e4b08bcc60a0 (diff)
qapi: introduce PreallocMode and new PreallocModes full and falloc.
This patch prepares for the subsequent patches. Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qapi/block-core.json')
-rw-r--r--qapi/block-core.json17
1 files changed, 17 insertions, 0 deletions
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 4064d5bf7d..95dcd81ed4 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1708,3 +1708,20 @@
'len' : 'int',
'offset': 'int',
'speed' : 'int' } }
+
+# @PreallocMode
+#
+# Preallocation mode of QEMU image file
+#
+# @off: no preallocation
+# @metadata: preallocate only for metadata
+# @falloc: like @full preallocation but allocate disk space by
+# posix_fallocate() rather than writing zeros.
+# @full: preallocate all data by writing zeros to device to ensure disk
+# space is really available. @full preallocation also sets up
+# metadata correctly.
+#
+# Since 2.2
+##
+{ 'enum': 'PreallocMode',
+ 'data': [ 'off', 'metadata', 'falloc', 'full' ] }