[libvirt] [PATCH 4/9] Implement the public API for vol zeroing

Eric Blake eblake at redhat.com
Tue Mar 2 23:31:19 UTC 2010


According to David Allan on 3/2/2010 3:13 PM:
> + * @flags: future flags, use 0 for now
> + *
> + * Ensure that future reads from the storage volume return zeroes.
> + *
> + * Returns 0 on success, or -1 on error
> + */
> +int
> +virStorageVolZeroOut(virStorageVolPtr vol,
> +                     unsigned int flags)
> +{
> +    virConnectPtr conn;
> +    VIR_DEBUG("vol=%p, flags=%u", vol, flags);

To be future-proof, we should explicitly reject non-zero flags.  That way,
if a newer client contacts an older server with a new flag supported only
by the client, the client doesn't get the mistaken impression that the
server can honor the flag.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 320 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100302/1e3e04c7/attachment-0001.sig>


More information about the libvir-list mailing list