qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] qcow2: Add bdrv_discard support


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v2] qcow2: Add bdrv_discard support
Date: Wed, 27 Aug 2014 15:12:42 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Mon, Aug 25, 2014 at 12:38:06AM +0800, Jun Li wrote:
> Why bdrv_discard does not yet pass the discard on to the underlying file
> system driver? And this exist a potential issue: host cluster leak for
> qcow2. As qcow2 image can be created on RAW disk,
> so this is not just "does not yet pass the discard on to the underlying file
> system driver".  Could you give some explanation why do not realize this
> function? Thx.
> 
> As I am trying to realize qcow2 shrinking, but hit bdrv_discard can not
> release the free cluster on host.

qcow2 is capable of passing discards down to the image file.  See
qcow2_process_discards().

It is important that s->discard_passthrough[QCOW2_DISCARD_REQUEST] is
true!  Make sure to use the pass-discard-request=on or discard=unmap
options.

Stefan

Attachment: pgpaglJMnrM4y.pgp
Description: PGP signature


reply via email to

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