cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-qcow2-Add-falloc-and-full-preallocation-option.patch

958e1b
From ddb1e6862dffe40bb2929d3a0e3eba198c54ee43 Mon Sep 17 00:00:00 2001
958e1b
From: Max Reitz <mreitz@redhat.com>
958e1b
Date: Mon, 10 Nov 2014 09:14:07 +0100
958e1b
Subject: [PATCH 30/41] qcow2: Add falloc and full preallocation option
958e1b
958e1b
Message-id: <1415610847-15383-5-git-send-email-mreitz@redhat.com>
958e1b
Patchwork-id: 62240
958e1b
O-Subject: [RHEL-7.1 qemu-kvm PATCH v2 4/4] qcow2: Add falloc and full preallocation option
958e1b
Bugzilla: 1087724
958e1b
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
958e1b
RH-Acked-by: Fam Zheng <famz@redhat.com>
958e1b
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
958e1b
958e1b
From: Hu Tao <hutao@cn.fujitsu.com>
958e1b
958e1b
preallocation=falloc allocates disk space by posix_fallocate(),
958e1b
preallocation=full allocates disk space by writing zeros to disk.
958e1b
Both modes imply preallocation=metadata.
958e1b
958e1b
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
958e1b
Reviewed-by: Max Reitz <mreitz@redhat.com>
958e1b
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
958e1b
(cherry picked from commit 0e4271b711a8ea766d29824c844e268b91ac3ae5)
958e1b
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
958e1b
958e1b
Conflicts:
958e1b
	block/qcow2.c
958e1b
958e1b
QEMUOptionParameter has not been replaced with QemuOpts downstream,
958e1b
total_size is in sectors instead of bytes in downstream's
958e1b
qcow2_create2().
958e1b
958e1b
The use of QEMUOptionParameter makes it rather difficult to set an
958e1b
option in qcow2 for the underlying file to be created. Because qcow2
958e1b
already used to pass a functionally empty options array, I added an
958e1b
assertion for this to be true and created a new QEMUOptionParameter
958e1b
array in case there are actually options to be passed to the protocol
958e1b
driver (that is, for preallocation).
958e1b
958e1b
Signed-off-by: Max Reitz <mreitz@redhat.com>
958e1b
---
958e1b
 block/qcow2.c              | 81 +++++++++++++++++++++++++++++++++++++++-------
958e1b
 qemu-doc.texi              |  8 +++--
958e1b
 qemu-img.texi              |  8 +++--
958e1b
 tests/qemu-iotests/082.out | 54 +++++++++++++++----------------
958e1b
 4 files changed, 106 insertions(+), 45 deletions(-)
958e1b
958e1b
diff --git a/block/qcow2.c b/block/qcow2.c
958e1b
index 99c6b93..43e54d6 100644
958e1b
--- a/block/qcow2.c
958e1b
+++ b/block/qcow2.c
958e1b
@@ -1557,8 +1557,7 @@ static int preallocate(BlockDriverState *bs)
958e1b
 static int qcow2_create2(const char *filename, int64_t total_size,
958e1b
                          const char *backing_file, const char *backing_format,
958e1b
                          int flags, size_t cluster_size, PreallocMode prealloc,
958e1b
-                         QEMUOptionParameter *options, int version,
958e1b
-                         Error **errp)
958e1b
+                         int version, Error **errp)
958e1b
 {
958e1b
     /* Calculate cluster_bits */
958e1b
     int cluster_bits;
958e1b
@@ -1588,8 +1587,71 @@ static int qcow2_create2(const char *filename, int64_t total_size,
958e1b
     uint64_t* refcount_table;
958e1b
     Error *local_err = NULL;
958e1b
     int ret;
958e1b
+    QEMUOptionParameter *options = NULL;
958e1b
+    BlockDriver *file_drv;
958e1b
+
958e1b
+    if (prealloc == PREALLOC_MODE_FULL || prealloc == PREALLOC_MODE_FALLOC) {
958e1b
+        int64_t meta_size = 0;
958e1b
+        uint64_t nreftablee, nrefblocke, nl1e, nl2e;
958e1b
+        int64_t aligned_total_size = align_offset(total_size * BDRV_SECTOR_SIZE,
958e1b
+                                                  cluster_size);
958e1b
+
958e1b
+        /* header: 1 cluster */
958e1b
+        meta_size += cluster_size;
958e1b
+
958e1b
+        /* total size of L2 tables */
958e1b
+        nl2e = aligned_total_size / cluster_size;
958e1b
+        nl2e = align_offset(nl2e, cluster_size / sizeof(uint64_t));
958e1b
+        meta_size += nl2e * sizeof(uint64_t);
958e1b
+
958e1b
+        /* total size of L1 tables */
958e1b
+        nl1e = nl2e * sizeof(uint64_t) / cluster_size;
958e1b
+        nl1e = align_offset(nl1e, cluster_size / sizeof(uint64_t));
958e1b
+        meta_size += nl1e * sizeof(uint64_t);
958e1b
+
958e1b
+        /* total size of refcount blocks
958e1b
+         *
958e1b
+         * note: every host cluster is reference-counted, including metadata
958e1b
+         * (even refcount blocks are recursively included).
958e1b
+         * Let:
958e1b
+         *   a = total_size * BDRV_SECTOR_SIZE (this is the guest disk size)
958e1b
+         *   m = meta size not including refcount blocks and refcount tables
958e1b
+         *   c = cluster size
958e1b
+         *   y1 = number of refcount blocks entries
958e1b
+         *   y2 = meta size including everything
958e1b
+         * then,
958e1b
+         *   y1 = (y2 + a)/c
958e1b
+         *   y2 = y1 * sizeof(u16) + y1 * sizeof(u16) * sizeof(u64) / c + m
958e1b
+         * we can get y1:
958e1b
+         *   y1 = (a + m) / (c - sizeof(u16) - sizeof(u16) * sizeof(u64) / c)
958e1b
+         */
958e1b
+        nrefblocke = (aligned_total_size + meta_size + cluster_size) /
958e1b
+            (cluster_size - sizeof(uint16_t) -
958e1b
+             1.0 * sizeof(uint16_t) * sizeof(uint64_t) / cluster_size);
958e1b
+        nrefblocke = align_offset(nrefblocke, cluster_size / sizeof(uint16_t));
958e1b
+        meta_size += nrefblocke * sizeof(uint16_t);
958e1b
+
958e1b
+        /* total size of refcount tables */
958e1b
+        nreftablee = nrefblocke * sizeof(uint16_t) / cluster_size;
958e1b
+        nreftablee = align_offset(nreftablee, cluster_size / sizeof(uint64_t));
958e1b
+        meta_size += nreftablee * sizeof(uint64_t);
958e1b
+
958e1b
+        file_drv = bdrv_find_protocol(filename, true);
958e1b
+        if (file_drv == NULL) {
958e1b
+            error_setg(errp, "Could not find protocol for file '%s'", filename);
958e1b
+            return -ENOENT;
958e1b
+        }
958e1b
+
958e1b
+        options = append_option_parameters(options, file_drv->create_options);
958e1b
+
958e1b
+        set_option_parameter_int(options, BLOCK_OPT_SIZE,
958e1b
+                                 aligned_total_size + meta_size);
958e1b
+        set_option_parameter(options, BLOCK_OPT_PREALLOC,
958e1b
+                             PreallocMode_lookup[prealloc]);
958e1b
+    }
958e1b
 
958e1b
     ret = bdrv_create_file(filename, options, &local_err);
958e1b
+    free_option_parameters(options);
958e1b
     if (ret < 0) {
958e1b
         error_propagate(errp, local_err);
958e1b
         return ret;
958e1b
@@ -1691,7 +1753,7 @@ static int qcow2_create2(const char *filename, int64_t total_size,
958e1b
     }
958e1b
 
958e1b
     /* And if we're supposed to preallocate metadata, do that now */
958e1b
-    if (prealloc == PREALLOC_MODE_METADATA) {
958e1b
+    if (prealloc != PREALLOC_MODE_OFF) {
958e1b
         BDRVQcowState *s = bs->opaque;
958e1b
         qemu_co_mutex_lock(&s->lock);
958e1b
         ret = preallocate(bs);
958e1b
@@ -1761,13 +1823,6 @@ static int qcow2_create(const char *filename, QEMUOptionParameter *options,
958e1b
         options++;
958e1b
     }
958e1b
 
958e1b
-    if (prealloc != PREALLOC_MODE_OFF &&
958e1b
-        prealloc != PREALLOC_MODE_METADATA) {
958e1b
-        error_setg(errp, "Unsupported preallocate mode: %s",
958e1b
-                   PreallocMode_lookup[prealloc]);
958e1b
-        return -EINVAL;
958e1b
-    }
958e1b
-
958e1b
     if (backing_file && prealloc != PREALLOC_MODE_OFF) {
958e1b
         error_setg(errp, "Backing file and preallocation cannot be used at "
958e1b
                    "the same time");
958e1b
@@ -1780,8 +1835,9 @@ static int qcow2_create(const char *filename, QEMUOptionParameter *options,
958e1b
         return -EINVAL;
958e1b
     }
958e1b
 
958e1b
+    assert(!options || !options->name);
958e1b
     ret = qcow2_create2(filename, sectors, backing_file, backing_fmt, flags,
958e1b
-                        cluster_size, prealloc, options, version, &local_err);
958e1b
+                        cluster_size, prealloc, version, &local_err);
958e1b
     if (error_is_set(&local_err)) {
958e1b
         error_propagate(errp, local_err);
958e1b
     }
958e1b
@@ -2315,7 +2371,8 @@ static QEMUOptionParameter qcow2_create_options[] = {
958e1b
     {
958e1b
         .name = BLOCK_OPT_PREALLOC,
958e1b
         .type = OPT_STRING,
958e1b
-        .help = "Preallocation mode (allowed values: off, metadata)"
958e1b
+        .help = "Preallocation mode (allowed values: off, metadata, "
958e1b
+                "falloc, full)"
958e1b
     },
958e1b
     {
958e1b
         .name = BLOCK_OPT_LAZY_REFCOUNTS,
958e1b
diff --git a/qemu-doc.texi b/qemu-doc.texi
958e1b
index dc5b49e..0f7e5f8 100644
958e1b
--- a/qemu-doc.texi
958e1b
+++ b/qemu-doc.texi
958e1b
@@ -567,9 +567,11 @@ sizes can improve the image file size whereas larger cluster sizes generally
958e1b
 provide better performance.
958e1b
 
958e1b
 @item preallocation
958e1b
-Preallocation mode (allowed values: off, metadata). An image with preallocated
958e1b
-metadata is initially larger but can improve performance when the image needs
958e1b
-to grow.
958e1b
+Preallocation mode (allowed values: @code{off}, @code{metadata}, @code{falloc},
958e1b
+@code{full}). An image with preallocated metadata is initially larger but can
958e1b
+improve performance when the image needs to grow. @code{falloc} and @code{full}
958e1b
+preallocations are like the same options of @code{raw} format, but sets up
958e1b
+metadata also.
958e1b
 
958e1b
 @item lazy_refcounts
958e1b
 If this option is set to @code{on}, reference count updates are postponed with
958e1b
diff --git a/qemu-img.texi b/qemu-img.texi
958e1b
index 80d3261..e943856 100644
958e1b
--- a/qemu-img.texi
958e1b
+++ b/qemu-img.texi
958e1b
@@ -432,9 +432,11 @@ sizes can improve the image file size whereas larger cluster sizes generally
958e1b
 provide better performance.
958e1b
 
958e1b
 @item preallocation
958e1b
-Preallocation mode (allowed values: off, metadata). An image with preallocated
958e1b
-metadata is initially larger but can improve performance when the image needs
958e1b
-to grow.
958e1b
+Preallocation mode (allowed values: @code{off}, @code{metadata}, @code{falloc},
958e1b
+@code{full}). An image with preallocated metadata is initially larger but can
958e1b
+improve performance when the image needs to grow. @code{falloc} and @code{full}
958e1b
+preallocations are like the same options of @code{raw} format, but sets up
958e1b
+metadata also.
958e1b
 
958e1b
 @item lazy_refcounts
958e1b
 If this option is set to @code{on}, reference count updates are postponed with
958e1b
diff --git a/tests/qemu-iotests/082.out b/tests/qemu-iotests/082.out
958e1b
index d71610b..8abfde7 100644
958e1b
--- a/tests/qemu-iotests/082.out
958e1b
+++ b/tests/qemu-iotests/082.out
958e1b
@@ -64,7 +64,7 @@ backing_file     File name of a base image
958e1b
 backing_fmt      Image format of the base image
958e1b
 encryption       Encrypt the image
958e1b
 cluster_size     qcow2 cluster size
958e1b
-preallocation    Preallocation mode (allowed values: off, metadata)
958e1b
+preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
958e1b
 lazy_refcounts   Postpone refcount updates
958e1b
 
958e1b
 Testing: create -f qcow2 -o ? TEST_DIR/t.qcow2 128M
958e1b
@@ -75,7 +75,7 @@ backing_file     File name of a base image
958e1b
 backing_fmt      Image format of the base image
958e1b
 encryption       Encrypt the image
958e1b
 cluster_size     qcow2 cluster size
958e1b
-preallocation    Preallocation mode (allowed values: off, metadata)
958e1b
+preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
958e1b
 lazy_refcounts   Postpone refcount updates
958e1b
 
958e1b
 Testing: create -f qcow2 -o cluster_size=4k,help TEST_DIR/t.qcow2 128M
958e1b
@@ -86,7 +86,7 @@ backing_file     File name of a base image
958e1b
 backing_fmt      Image format of the base image
958e1b
 encryption       Encrypt the image
958e1b
 cluster_size     qcow2 cluster size
958e1b
-preallocation    Preallocation mode (allowed values: off, metadata)
958e1b
+preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
958e1b
 lazy_refcounts   Postpone refcount updates
958e1b
 
958e1b
 Testing: create -f qcow2 -o cluster_size=4k,? TEST_DIR/t.qcow2 128M
958e1b
@@ -97,7 +97,7 @@ backing_file     File name of a base image
958e1b
 backing_fmt      Image format of the base image
958e1b
 encryption       Encrypt the image
958e1b
 cluster_size     qcow2 cluster size
958e1b
-preallocation    Preallocation mode (allowed values: off, metadata)
958e1b
+preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
958e1b
 lazy_refcounts   Postpone refcount updates
958e1b
 
958e1b
 Testing: create -f qcow2 -o help,cluster_size=4k TEST_DIR/t.qcow2 128M
958e1b
@@ -108,7 +108,7 @@ backing_file     File name of a base image
958e1b
 backing_fmt      Image format of the base image
958e1b
 encryption       Encrypt the image
958e1b
 cluster_size     qcow2 cluster size
958e1b
-preallocation    Preallocation mode (allowed values: off, metadata)
958e1b
+preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
958e1b
 lazy_refcounts   Postpone refcount updates
958e1b
 
958e1b
 Testing: create -f qcow2 -o ?,cluster_size=4k TEST_DIR/t.qcow2 128M
958e1b
@@ -119,7 +119,7 @@ backing_file     File name of a base image
958e1b
 backing_fmt      Image format of the base image
958e1b
 encryption       Encrypt the image
958e1b
 cluster_size     qcow2 cluster size
958e1b
-preallocation    Preallocation mode (allowed values: off, metadata)
958e1b
+preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
958e1b
 lazy_refcounts   Postpone refcount updates
958e1b
 
958e1b
 Testing: create -f qcow2 -o cluster_size=4k -o help TEST_DIR/t.qcow2 128M
958e1b
@@ -130,7 +130,7 @@ backing_file     File name of a base image
958e1b
 backing_fmt      Image format of the base image
958e1b
 encryption       Encrypt the image
958e1b
 cluster_size     qcow2 cluster size
958e1b
-preallocation    Preallocation mode (allowed values: off, metadata)
958e1b
+preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
958e1b
 lazy_refcounts   Postpone refcount updates
958e1b
 
958e1b
 Testing: create -f qcow2 -o cluster_size=4k -o ? TEST_DIR/t.qcow2 128M
958e1b
@@ -141,7 +141,7 @@ backing_file     File name of a base image
958e1b
 backing_fmt      Image format of the base image
958e1b
 encryption       Encrypt the image
958e1b
 cluster_size     qcow2 cluster size
958e1b
-preallocation    Preallocation mode (allowed values: off, metadata)
958e1b
+preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
958e1b
 lazy_refcounts   Postpone refcount updates
958e1b
 
958e1b
 Testing: create -f qcow2 -o backing_file=TEST_DIR/t.qcow2,,help TEST_DIR/t.qcow2 128M
958e1b
@@ -167,7 +167,7 @@ backing_file     File name of a base image
958e1b
 backing_fmt      Image format of the base image
958e1b
 encryption       Encrypt the image
958e1b
 cluster_size     qcow2 cluster size
958e1b
-preallocation    Preallocation mode (allowed values: off, metadata)
958e1b
+preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
958e1b
 lazy_refcounts   Postpone refcount updates
958e1b
 
958e1b
 Testing: create -o help
958e1b
@@ -245,7 +245,7 @@ backing_file     File name of a base image
958e1b
 backing_fmt      Image format of the base image
958e1b
 encryption       Encrypt the image
958e1b
 cluster_size     qcow2 cluster size
958e1b
-preallocation    Preallocation mode (allowed values: off, metadata)
958e1b
+preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
958e1b
 lazy_refcounts   Postpone refcount updates
958e1b
 
958e1b
 Testing: convert -O qcow2 -o ? TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
958e1b
@@ -256,7 +256,7 @@ backing_file     File name of a base image
958e1b
 backing_fmt      Image format of the base image
958e1b
 encryption       Encrypt the image
958e1b
 cluster_size     qcow2 cluster size
958e1b
-preallocation    Preallocation mode (allowed values: off, metadata)
958e1b
+preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
958e1b
 lazy_refcounts   Postpone refcount updates
958e1b
 
958e1b
 Testing: convert -O qcow2 -o cluster_size=4k,help TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
958e1b
@@ -267,7 +267,7 @@ backing_file     File name of a base image
958e1b
 backing_fmt      Image format of the base image
958e1b
 encryption       Encrypt the image
958e1b
 cluster_size     qcow2 cluster size
958e1b
-preallocation    Preallocation mode (allowed values: off, metadata)
958e1b
+preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
958e1b
 lazy_refcounts   Postpone refcount updates
958e1b
 
958e1b
 Testing: convert -O qcow2 -o cluster_size=4k,? TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
958e1b
@@ -278,7 +278,7 @@ backing_file     File name of a base image
958e1b
 backing_fmt      Image format of the base image
958e1b
 encryption       Encrypt the image
958e1b
 cluster_size     qcow2 cluster size
958e1b
-preallocation    Preallocation mode (allowed values: off, metadata)
958e1b
+preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
958e1b
 lazy_refcounts   Postpone refcount updates
958e1b
 
958e1b
 Testing: convert -O qcow2 -o help,cluster_size=4k TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
958e1b
@@ -289,7 +289,7 @@ backing_file     File name of a base image
958e1b
 backing_fmt      Image format of the base image
958e1b
 encryption       Encrypt the image
958e1b
 cluster_size     qcow2 cluster size
958e1b
-preallocation    Preallocation mode (allowed values: off, metadata)
958e1b
+preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
958e1b
 lazy_refcounts   Postpone refcount updates
958e1b
 
958e1b
 Testing: convert -O qcow2 -o ?,cluster_size=4k TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
958e1b
@@ -300,7 +300,7 @@ backing_file     File name of a base image
958e1b
 backing_fmt      Image format of the base image
958e1b
 encryption       Encrypt the image
958e1b
 cluster_size     qcow2 cluster size
958e1b
-preallocation    Preallocation mode (allowed values: off, metadata)
958e1b
+preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
958e1b
 lazy_refcounts   Postpone refcount updates
958e1b
 
958e1b
 Testing: convert -O qcow2 -o cluster_size=4k -o help TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
958e1b
@@ -311,7 +311,7 @@ backing_file     File name of a base image
958e1b
 backing_fmt      Image format of the base image
958e1b
 encryption       Encrypt the image
958e1b
 cluster_size     qcow2 cluster size
958e1b
-preallocation    Preallocation mode (allowed values: off, metadata)
958e1b
+preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
958e1b
 lazy_refcounts   Postpone refcount updates
958e1b
 
958e1b
 Testing: convert -O qcow2 -o cluster_size=4k -o ? TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
958e1b
@@ -322,7 +322,7 @@ backing_file     File name of a base image
958e1b
 backing_fmt      Image format of the base image
958e1b
 encryption       Encrypt the image
958e1b
 cluster_size     qcow2 cluster size
958e1b
-preallocation    Preallocation mode (allowed values: off, metadata)
958e1b
+preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
958e1b
 lazy_refcounts   Postpone refcount updates
958e1b
 
958e1b
 Testing: convert -O qcow2 -o backing_file=TEST_DIR/t.qcow2,,help TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.base
958e1b
@@ -348,7 +348,7 @@ backing_file     File name of a base image
958e1b
 backing_fmt      Image format of the base image
958e1b
 encryption       Encrypt the image
958e1b
 cluster_size     qcow2 cluster size
958e1b
-preallocation    Preallocation mode (allowed values: off, metadata)
958e1b
+preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
958e1b
 lazy_refcounts   Postpone refcount updates
958e1b
 
958e1b
 Testing: convert -o help
958e1b
@@ -415,7 +415,7 @@ backing_file     File name of a base image
958e1b
 backing_fmt      Image format of the base image
958e1b
 encryption       Encrypt the image
958e1b
 cluster_size     qcow2 cluster size
958e1b
-preallocation    Preallocation mode (allowed values: off, metadata)
958e1b
+preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
958e1b
 lazy_refcounts   Postpone refcount updates
958e1b
 
958e1b
 Testing: amend -f qcow2 -o ? TEST_DIR/t.qcow2
958e1b
@@ -426,7 +426,7 @@ backing_file     File name of a base image
958e1b
 backing_fmt      Image format of the base image
958e1b
 encryption       Encrypt the image
958e1b
 cluster_size     qcow2 cluster size
958e1b
-preallocation    Preallocation mode (allowed values: off, metadata)
958e1b
+preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
958e1b
 lazy_refcounts   Postpone refcount updates
958e1b
 
958e1b
 Testing: amend -f qcow2 -o cluster_size=4k,help TEST_DIR/t.qcow2
958e1b
@@ -437,7 +437,7 @@ backing_file     File name of a base image
958e1b
 backing_fmt      Image format of the base image
958e1b
 encryption       Encrypt the image
958e1b
 cluster_size     qcow2 cluster size
958e1b
-preallocation    Preallocation mode (allowed values: off, metadata)
958e1b
+preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
958e1b
 lazy_refcounts   Postpone refcount updates
958e1b
 
958e1b
 Testing: amend -f qcow2 -o cluster_size=4k,? TEST_DIR/t.qcow2
958e1b
@@ -448,7 +448,7 @@ backing_file     File name of a base image
958e1b
 backing_fmt      Image format of the base image
958e1b
 encryption       Encrypt the image
958e1b
 cluster_size     qcow2 cluster size
958e1b
-preallocation    Preallocation mode (allowed values: off, metadata)
958e1b
+preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
958e1b
 lazy_refcounts   Postpone refcount updates
958e1b
 
958e1b
 Testing: amend -f qcow2 -o help,cluster_size=4k TEST_DIR/t.qcow2
958e1b
@@ -459,7 +459,7 @@ backing_file     File name of a base image
958e1b
 backing_fmt      Image format of the base image
958e1b
 encryption       Encrypt the image
958e1b
 cluster_size     qcow2 cluster size
958e1b
-preallocation    Preallocation mode (allowed values: off, metadata)
958e1b
+preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
958e1b
 lazy_refcounts   Postpone refcount updates
958e1b
 
958e1b
 Testing: amend -f qcow2 -o ?,cluster_size=4k TEST_DIR/t.qcow2
958e1b
@@ -470,7 +470,7 @@ backing_file     File name of a base image
958e1b
 backing_fmt      Image format of the base image
958e1b
 encryption       Encrypt the image
958e1b
 cluster_size     qcow2 cluster size
958e1b
-preallocation    Preallocation mode (allowed values: off, metadata)
958e1b
+preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
958e1b
 lazy_refcounts   Postpone refcount updates
958e1b
 
958e1b
 Testing: amend -f qcow2 -o cluster_size=4k -o help TEST_DIR/t.qcow2
958e1b
@@ -481,7 +481,7 @@ backing_file     File name of a base image
958e1b
 backing_fmt      Image format of the base image
958e1b
 encryption       Encrypt the image
958e1b
 cluster_size     qcow2 cluster size
958e1b
-preallocation    Preallocation mode (allowed values: off, metadata)
958e1b
+preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
958e1b
 lazy_refcounts   Postpone refcount updates
958e1b
 
958e1b
 Testing: amend -f qcow2 -o cluster_size=4k -o ? TEST_DIR/t.qcow2
958e1b
@@ -492,7 +492,7 @@ backing_file     File name of a base image
958e1b
 backing_fmt      Image format of the base image
958e1b
 encryption       Encrypt the image
958e1b
 cluster_size     qcow2 cluster size
958e1b
-preallocation    Preallocation mode (allowed values: off, metadata)
958e1b
+preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
958e1b
 lazy_refcounts   Postpone refcount updates
958e1b
 
958e1b
 Testing: amend -f qcow2 -o backing_file=TEST_DIR/t.qcow2,,help TEST_DIR/t.qcow2
958e1b
@@ -520,7 +520,7 @@ backing_file     File name of a base image
958e1b
 backing_fmt      Image format of the base image
958e1b
 encryption       Encrypt the image
958e1b
 cluster_size     qcow2 cluster size
958e1b
-preallocation    Preallocation mode (allowed values: off, metadata)
958e1b
+preallocation    Preallocation mode (allowed values: off, metadata, falloc, full)
958e1b
 lazy_refcounts   Postpone refcount updates
958e1b
 
958e1b
 Testing: convert -o help
958e1b
-- 
958e1b
1.8.3.1
958e1b