qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] [PATCH v2] qcow2: fix preallocation with m


From: Ivan Ren
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH v2] qcow2: fix preallocation with metadata on bare block device
Date: Fri, 11 May 2018 22:40:48 +0800

>> Create a qcow2 directly on bare block device with
>> "-o preallocation=metadata" option. When read this qcow2, it will
>> return pre-existing data on block device, and this may lead to
>> data leakage. This patch add QCOW_OFLAG_ZERO for all preallocated
>> l2 entry to avoid this problem.
>
> This is a semantic change; are we okay making it?

> Does your code properly check for qcow2v2 files, which don't support
> QCOW_OFLAG_ZERO (only qcow2v3 supports it)?

Sorry for this mistake.
Current solution can only be used with s->qcow_version >= 3.
I'll fix it.


On Fri, May 11, 2018 at 9:41 PM Eric Blake <address@hidden> wrote:
On 05/11/2018 07:37 AM, Ivan Ren wrote:
> Create a qcow2 directly on bare block device with
> "-o preallocation=metadata" option. When read this qcow2, it will
> return pre-existing data on block device, and this may lead to
> data leakage. This patch add QCOW_OFLAG_ZERO for all preallocated
> l2 entry to avoid this problem.

This is a semantic change; are we okay making it?

Does your code properly check for qcow2v2 files, which don't support
QCOW_OFLAG_ZERO (only qcow2v3 supports it)?

>
> Signed-off-by: Ivan Ren <address@hidden>
> ---

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]