[libvirt] [PATCH] [RFC] libxl: add discard support to libxl_device_disk
Olaf Hering
olaf at aepfle.de
Fri Jan 31 09:20:04 UTC 2014
On Thu, Jan 30, Daniel P. Berrange wrote:
> Here's two examples:
Thanks, this worked for me:
<disk type='file' device='disk'>
<driver name='qemu' type='raw' discard='ignore'/>
<source file='/disk0.raw'/>
<target dev='xvda' bus='xen'/>
</disk>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' discard='unmap'/>
<source file='/disk0.file'/>
<target dev='xvdb' bus='xen'/>
</disk>
> In the case where LIBXL_HAVE_LIBXL_DEVICE_DISK_DISCARD_ENABLE is
> not defined, then you should call virReportError with the code
> VIR_ERR_CONFIG_UNSUPPORTED, if discard != VIR_DOMAIN_DISK_DISCARD_DEFAULT
> This ensures apps get an error if they had requested discard instead
> of being silently ignored.
I will test this approach and resend.
Olaf
More information about the libvir-list
mailing list