qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH v9 23/34] qcow2: Add subcluster support to discard_in_l2_slic


From: Max Reitz
Subject: Re: [PATCH v9 23/34] qcow2: Add subcluster support to discard_in_l2_slice()
Date: Thu, 2 Jul 2020 15:24:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0

On 28.06.20 13:02, Alberto Garcia wrote:
> Two things need to be taken into account here:
> 
> 1) With full_discard == true the L2 entry must be cleared completely.
>    This also includes the L2 bitmap if the image has extended L2
>    entries.
> 
> 2) With full_discard == false we have to make the discarded cluster
>    read back as zeroes. With normal L2 entries this is done with the
>    QCOW_OFLAG_ZERO bit, whereas with extended L2 entries this is done
>    with the individual 'all zeroes' bits for each subcluster.
> 
>    Note however that QCOW_OFLAG_ZERO is not supported in v2 qcow2
>    images so, if there is a backing file, discard cannot guarantee
>    that the image will read back as zeroes. If this is important for
>    the caller it should forbid it as qcow2_co_pdiscard() does (see
>    80f5c01183 for more details).
> 
> Signed-off-by: Alberto Garcia <berto@igalia.com>
> Reviewed-by: Eric Blake <eblake@redhat.com>
> ---
>  block/qcow2-cluster.c | 52 +++++++++++++++++++------------------------
>  1 file changed, 23 insertions(+), 29 deletions(-)

Reviewed-by: Max Reitz <mreitz@redhat.com>

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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