Re: [Qemu-devel] [PATCH] qcow2: fix preallocation with metadata on bare block device

2018-05-11 Thread Ivan Ren
> This says what the patch does, but not why. What is the actual use case > scenario where changing semantics to have the qcow2 overwrite the > garbage to read 0 instead of any pre-existing garbage, when dealing with > portions of the disk that have not yet been written by the guest? Are > you tr

Re: [Qemu-devel] [PATCH] qcow2: fix preallocation with metadata on bare block device

2018-05-10 Thread Eric Blake
On 05/08/2018 07:27 AM, Ivan Ren wrote: Create a qcow2 directly on bare block device with "-o preallocation=metadata" option. When read this qcow2, it will return dirty data of block device. Yes, reading garbage is expected. This patch add QCOW_OFLAG_ZERO for all preallocated l2 entry if the

Re: [Qemu-devel] [PATCH] qcow2: fix preallocation with metadata on bare block device

2018-05-10 Thread Ivan Ren
ping for review On Tue, May 8, 2018 at 8:27 PM Ivan Ren wrote: > Create a qcow2 directly on bare block device with > "-o preallocation=metadata" option. When read this qcow2, it will > return dirty data of block device. This patch add QCOW_OFLAG_ZERO > for all preallocated l2 entry if the underl

[Qemu-devel] [PATCH] qcow2: fix preallocation with metadata on bare block device

2018-05-08 Thread Ivan Ren
Create a qcow2 directly on bare block device with "-o preallocation=metadata" option. When read this qcow2, it will return dirty data of block device. This patch add QCOW_OFLAG_ZERO for all preallocated l2 entry if the underlying device is a bare block device. Signed-off-by: Ivan Ren --- block/q