summaryrefslogtreecommitdiffstats
path: root/qapi
diff options
context:
space:
mode:
authorHu Tao2014-09-10 11:05:47 +0200
committerKevin Wolf2014-09-12 15:43:06 +0200
commitffeaac9b4e23a3033e8120cc34bacadc09487f1b (patch)
tree1c76d91db7c14d786f21f10494aa3dbb3a1510dd /qapi
parentblock: don't convert file size to sector size (diff)
downloadqemu-ffeaac9b4e23a3033e8120cc34bacadc09487f1b.tar.gz
qemu-ffeaac9b4e23a3033e8120cc34bacadc09487f1b.tar.xz
qemu-ffeaac9b4e23a3033e8120cc34bacadc09487f1b.zip
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')
-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' ] }