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