[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 1/2] qcow2: Force preallocation with data-file-raw
From: |
Eric Blake |
Subject: |
Re: [PATCH v2 1/2] qcow2: Force preallocation with data-file-raw |
Date: |
Fri, 26 Mar 2021 10:13:35 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
On 3/26/21 9:55 AM, Max Reitz wrote:
> Setting the qcow2 data-file-raw bit means that you can ignore the
> qcow2 metadata when reading from the external data file. It does not
> mean that you have to ignore it, though. Therefore, the data read must
> be the same regardless of whether you interpret the metadata or whether
> you ignore it, and thus the L1/L2 tables must all be present and give a
> 1:1 mapping.
>
> This patch changes 244's output: First, the qcow2 file is larger right
> after creation, because of metadata preallocation. Second, the qemu-img
> map output changes: Everything that was not explicitly discarded or
> zeroed is now a data area.
>
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
> block/qcow2.c | 34 ++++++++++++++++++++++++++++++++++
> tests/qemu-iotests/244.out | 9 ++++-----
> 2 files changed, 38 insertions(+), 5 deletions(-)
>
Reviewed-by: Eric Blake <eblake@redhat.com>
I think this counts as a bug fix worthy of inclusion in 6.0.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org