[libvirt] [PATCH v2 1/4] Introduce virDomainFSTrim() public API

Eric Blake eblake at redhat.com
Wed Nov 28 23:41:50 UTC 2012


> This will call FITRIM within guest. The API has 4 arguments,
> however, only 2 will be used for now (@dom and @minumum).
> The rest two are there if in future qemu guest agent learns them.

s/in future/in the future/


> +/**
> + * virDomainFSTrim:
> + * @dom: a domain object
> + * @mountPoint: which mount point trim

s/trim/to trim/

> + * @minimum: Minimum contiguous free range to discard in bytes
> + * @flags: extra flags, not used yet, so callers should always pass
> 0
> + *
> + * Calls FITRIM within the guest (hence guest agent may be
> + * required depending on hypervisor used). Either call it on each
> + * mounted filesystem (@mountPoint is NULL) or just on specified
> + * @mountPoint. @minimum tell that free ranges smaller than this

s/tell/hints/

> + * may be ignored (this is a hint and the guest may not respect
> + * it).  By increasing this value, the fstrim operation will
> + * complete more quickly for filesystems with badly fragmented
> + * free space, although not all blocks will be discarded.

Maybe mention that the command may fail if @minimum is not 0.




More information about the libvir-list mailing list