From ffeaac9b4e23a3033e8120cc34bacadc09487f1b Mon Sep 17 00:00:00 2001 From: Hu Tao Date: Wed, 10 Sep 2014 17:05:47 +0800 Subject: qapi: introduce PreallocMode and new PreallocModes full and falloc. This patch prepares for the subsequent patches. Signed-off-by: Hu Tao Reviewed-by: Max Reitz Reviewed-by: Kevin Wolf Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- qapi/block-core.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'qapi/block-core.json') 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' ] } -- cgit v1.2.3-55-g7522