[libvirt] [PATCH RFC 1/3] conf: Add flags to the storage pool source

John Ferlan jferlan at redhat.com
Fri Dec 4 22:16:54 UTC 2015


Add a flags argument to the storage pool source to handle allowing some
feature to be passed to the lower/backend for the purpose of executing
specific code paths or making decisions on algorithms.

Signed-off-by: John Ferlan <jferlan at redhat.com>
---
 src/conf/storage_conf.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/conf/storage_conf.h b/src/conf/storage_conf.h
index ec59c17..bb6bcc7 100644
--- a/src/conf/storage_conf.h
+++ b/src/conf/storage_conf.h
@@ -198,6 +198,14 @@ struct _virStoragePoolSourceAdapter {
     } data;
 };
 
+/* Flags to be used in pool source for some feature or dependency of
+ * the source that the backends may need to know about in order to make
+ * decisions on how data is presented
+ */
+typedef enum {
+    VIR_STORAGE_POOL_SOURCE_USER_FRIENDLY_NAMES           = 1 << 0,
+} virStoragePoolSourceFlags;
+
 typedef struct _virStoragePoolSource virStoragePoolSource;
 typedef virStoragePoolSource *virStoragePoolSourcePtr;
 struct _virStoragePoolSource {
@@ -234,6 +242,9 @@ struct _virStoragePoolSource {
      * or lvm version, etc.
      */
     int format;
+
+    /* Pool specific flags */
+    unsigned int flags;  /* virStoragePoolSourceFlags */
 };
 
 typedef struct _virStoragePoolTarget virStoragePoolTarget;
-- 
2.5.0




More information about the libvir-list mailing list