[libvirt] [PATCH 18/35] qemu: block: Always set discard for storage nodes

Peter Krempa pkrempa at redhat.com
Thu May 3 06:52:28 UTC 2018


On Wed, May 02, 2018 at 15:39:07 -0400, John Ferlan wrote:
> 
> 
> On 04/25/2018 11:15 AM, Peter Krempa wrote:
> > Enabling discard for the storage node allows the format drivers to
> > discard snapshots and other things, while configuration of the format
> > layer actually decides whether to actually discard data on request from
> > the host.
> > 
> > Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> > ---
> >  src/qemu/qemu_block.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> 
> Isn't this related to the {disk|src}->discard value? Which we copied
> from patch 3.
> 
> So you'd just be unconditionally setting here regardless of what was
> configured?

The actual discard value will be used for the "format" (qcow2/raw/...)
layer. QEMU always enables discard for the storage layers so that qcow2
can discard blocks from a deleted snapshot etc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180503/60ad871e/attachment-0001.sig>


More information about the libvir-list mailing list