[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 17/17] doc: Preallocation does not require writing ze
From: |
Max Reitz |
Subject: |
[Qemu-devel] [PULL 17/17] doc: Preallocation does not require writing zeroes |
Date: |
Mon, 19 Aug 2019 18:17:23 +0200 |
When preallocating an encrypted qcow2 image, it just lets the protocol
driver write data and then does not mark the clusters as zero.
Therefore, reading this image will yield effectively random data.
As such, we have not fulfilled the promise of always writing zeroes when
preallocating an image in a while. It seems that nobody has really
cared, so change the documentation to conform to qemu's actual behavior.
Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Daniel P. Berrangé <address@hidden>
Reviewed-by: Maxim Levitsky <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
---
qapi/block-core.json | 9 +++++----
docs/qemu-block-drivers.texi | 4 ++--
qemu-img.texi | 4 ++--
3 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/qapi/block-core.json b/qapi/block-core.json
index a5ab38db99..e6edd641f1 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -5178,10 +5178,11 @@
# @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.
+# posix_fallocate() rather than writing data.
+# @full: preallocate all data by writing it to the device to ensure
+# disk space is really available. This data may or may not be
+# zero, depending on the image format and storage.
+# @full preallocation also sets up metadata correctly.
#
# Since: 2.2
##
diff --git a/docs/qemu-block-drivers.texi b/docs/qemu-block-drivers.texi
index 91ab0eceae..c02547e28c 100644
--- a/docs/qemu-block-drivers.texi
+++ b/docs/qemu-block-drivers.texi
@@ -31,8 +31,8 @@ Supported options:
@item preallocation
Preallocation mode (allowed values: @code{off}, @code{falloc}, @code{full}).
@code{falloc} mode preallocates space for image by calling posix_fallocate().
-@code{full} mode preallocates space for image by writing zeros to underlying
-storage.
+@code{full} mode preallocates space for image by writing data to underlying
+storage. This data may or may not be zero, depending on the storage location.
@end table
@item qcow2
diff --git a/qemu-img.texi b/qemu-img.texi
index c8e9bba515..b5156d6316 100644
--- a/qemu-img.texi
+++ b/qemu-img.texi
@@ -666,8 +666,8 @@ Supported options:
@item preallocation
Preallocation mode (allowed values: @code{off}, @code{falloc}, @code{full}).
@code{falloc} mode preallocates space for image by calling posix_fallocate().
-@code{full} mode preallocates space for image by writing zeros to underlying
-storage.
+@code{full} mode preallocates space for image by writing data to underlying
+storage. This data may or may not be zero, depending on the storage location.
@end table
@item qcow2
--
2.21.0
- [Qemu-devel] [PULL 05/17] block: Implement .bdrv_has_zero_init_truncate(), (continued)
- [Qemu-devel] [PULL 05/17] block: Implement .bdrv_has_zero_init_truncate(), Max Reitz, 2019/08/19
- [Qemu-devel] [PULL 06/17] block: Use bdrv_has_zero_init_truncate(), Max Reitz, 2019/08/19
- [Qemu-devel] [PULL 07/17] qcow2: Fix .bdrv_has_zero_init(), Max Reitz, 2019/08/19
- [Qemu-devel] [PULL 08/17] vdi: Fix .bdrv_has_zero_init(), Max Reitz, 2019/08/19
- [Qemu-devel] [PULL 09/17] vhdx: Fix .bdrv_has_zero_init(), Max Reitz, 2019/08/19
- [Qemu-devel] [PULL 10/17] iotests: Convert to preallocated encrypted qcow2, Max Reitz, 2019/08/19
- [Qemu-devel] [PULL 11/17] iotests: Test convert -n to pre-filled image, Max Reitz, 2019/08/19
- [Qemu-devel] [PULL 14/17] vmdk: Make block_status recurse for flat extents, Max Reitz, 2019/08/19
- [Qemu-devel] [PULL 15/17] vpc: Do not return RAW from block_status, Max Reitz, 2019/08/19
- [Qemu-devel] [PULL 13/17] vdi: Make block_status recurse for fixed images, Max Reitz, 2019/08/19
- [Qemu-devel] [PULL 17/17] doc: Preallocation does not require writing zeroes,
Max Reitz <=
- [Qemu-devel] [PULL 12/17] iotests: Full mirror to existing non-zero image, Max Reitz, 2019/08/19
- [Qemu-devel] [PULL 16/17] iotests: Fix 141 when run with qed, Max Reitz, 2019/08/19
- Re: [Qemu-devel] [PULL 00/17] Block patches, Peter Maydell, 2019/08/20