[libvirt] [PATCHv6 3/8] storage: Add file storage APIs in the default storage driver
Eric Blake
eblake at redhat.com
Thu Feb 13 20:47:57 UTC 2014
On 02/13/2014 09:49 AM, Peter Krempa wrote:
> Add APIs that will allow to use the storage driver to assist in
> operations on files even for remote filesystems without native
> representation as files in the host.
> ---
>
> Notes:
> Version 6:
> - rewrite due to change of exporting approach
>
> Version 5:
> - adapt to error reporting change
>
> src/storage/storage_backend.c | 37 +++++++++++
> src/storage/storage_backend.h | 41 ++++++++++++
> src/storage/storage_driver.c | 145 ++++++++++++++++++++++++++++++++++++++++++
> src/storage/storage_driver.h | 32 +++++++++-
> tests/Makefile.am | 3 +
> 5 files changed, 257 insertions(+), 1 deletion(-)
>
> +struct _virStorageFileBackend {
> + int type;
> + int protocol;
> +
> + /* All storage file callbacks may be omitted if not implemented */
> +
> + /* The following group of callbacks is expected to set a libvirt
> + * error on failure. */
> + virStorageFileBackendInit backendInit;
> + virStorageFileBackendDeinit backendDeinit;
> +
> + /* The following group of callbacks is expected to set errno
> + * and return -1 on error. No libvirt error shall be reported */
> + virStorageFileBackendCreate storageFileCreate;
> + virStorageFileBackendUnlink storageFileUnlink;
> + virStorageFileBackendStat storageFileStat;
Thanks; the comments really help.
ACK.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140213/5c7bc85e/attachment-0001.sig>
More information about the libvir-list
mailing list