On Wed, May 15, 2013 at 03:44:11PM +0200, Paolo Bonzini wrote:
Il 15/05/2013 15:17, Daniel P. Berrange ha scritto:
> On Wed, May 15, 2013 at 02:56:03PM +0200, Paolo Bonzini wrote:
>> Il 14/05/2013 14:44, Osier Yang ha scritto:
>>> QEMU introduced "discard" option for drive since commit
a9384aff53,
>>>
>>> <...>
>>> @var{discard} is one of "ignore" (or "off") or
"unmap" (or "on") and
>>> controls whether @dfn{discard} (also known as @dfn{trim} or @dfn{unmap})
>>> requests are ignored or passed to the filesystem. Some machine types
>>> may not support discard requests.
>>> </...>
>>>
>>> This patch exposes the support in libvirt.
>>>
>>> QEMU supported "discard" for "-drive" since v1.5.0-rc0:
>>
>> I would prefer to use ignore/unmap instead of off/on in libvirt.
>
> If we think there's any chance QEMU might gain a 3rd possible
> value for this setting, then I tend to agree with you that
> avoiding off/on would be desirable.
Yes, the 3rd setting would be "anchor", i.e. when discarding keep any
preallocation but discard the data. This corresponds to the XFS ioctl
XFS_IOC_ZERO_RANGE.
Ok, we should definitely not use off/on then.
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|