[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qemu-block
Subject:    Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] qcow2: Repair OFLAG_COPIED when fixing leaks
From:       Eric Blake <eblake () redhat ! com>
Date:       2018-04-30 15:55:04
Message-ID: d8b67db9-edc7-a045-9a40-1b7caded8dc1 () redhat ! com
[Download RAW message or body]

On 04/28/2018 11:34 AM, Max Reitz wrote:
> Repairing OFLAG_COPIED is usually safe because it is done after the
> refcounts have been repaired.  Therefore, it we did not find anyone else
> referencing a data or L2 cluster, it makes no sense to not set
> OFLAG_COPIED -- and the other direction (clearing OFLAG_COPIED) is
> always safe, anyway, it may just induce leaks.
> 
> Furthermore, if OFLAG_COPIED is actually consistent with a wrong (leaky)
> refcount, we will decrement the refcount with -r leaks, but OFLAG_COPIED
> will then be wrong.  qemu-img check should not produce images that are
> more corrupted afterwards then they were before.
> 
> Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1527085
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
>   block/qcow2-refcount.c | 25 +++++++++++++++++--------
>   1 file changed, 17 insertions(+), 8 deletions(-)
> 

Reviewed-by: Eric Blake <eblake@redhat.com>

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic