[libvirt] [PATCH v2 3/5] New struct for spawning a vol building thread

Guannan Ren gren at redhat.com
Sun Jul 17 10:44:59 UTC 2011


---
 src/storage/storage_backend.h |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/src/storage/storage_backend.h b/src/storage/storage_backend.h
index 67ac32c..d713b6d 100644
--- a/src/storage/storage_backend.h
+++ b/src/storage/storage_backend.h
@@ -62,6 +62,17 @@ virStorageBackendFSImageToolTypeToFunc(int tool_type);
 typedef struct _virStorageBackend virStorageBackend;
 typedef virStorageBackend *virStorageBackendPtr;
 
+typedef struct _volBuildThread volBuildThread;
+typedef volBuildThread *volBuildThreadPtr;
+struct _volBuildThread {
+    virStorageBackendBuildVol buildvol;
+    virStoragePoolPtr obj;
+    virStoragePoolObjPtr pool;
+    virStorageVolDefPtr vol;
+    unsigned threadEnd : 1;
+    int buildret;
+};
+
 struct _virStorageBackend {
     int type;
 
@@ -96,6 +107,10 @@ enum {
     VIR_STORAGE_VOL_OPEN_DIR    = 1 << 4, /* directories okay */
 };
 
+enum virStorageJobSignals {
+    VOL_JOB_SIGNAL_CANCEL  = 1 << 0,
+};
+
 # define VIR_STORAGE_VOL_OPEN_DEFAULT (VIR_STORAGE_VOL_OPEN_ERROR    |\
                                        VIR_STORAGE_VOL_OPEN_REG      |\
                                        VIR_STORAGE_VOL_OPEN_CHAR     |\
@@ -148,5 +163,5 @@ int virStorageBackendRunProgNul(virStoragePoolObjPtr pool,
                                 virStorageBackendListVolNulFunc func,
                                 void *data);
 
-
+void virStorageBackendVoluCleanup(void *argv);
 #endif /* __VIR_STORAGE_BACKEND_H__ */
-- 
1.7.1




More information about the libvir-list mailing list