[PATCH 05/22] conf: Move definition of some disk type enums to a common header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Certain disk config fields are mirrored between the disk and storage
source definitions. We nee

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/conf/domain_conf.h  | 37 -------------------------------------
 src/conf/virconftypes.h | 39 ++++++++++++++++++++++++++++++++++++++-
 2 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 9e6dd930fa..98f99721f0 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -413,17 +413,6 @@ typedef enum {
     VIR_DOMAIN_DISK_BUS_LAST
 } virDomainDiskBus;

-typedef enum {
-    VIR_DOMAIN_DISK_CACHE_DEFAULT,
-    VIR_DOMAIN_DISK_CACHE_DISABLE,
-    VIR_DOMAIN_DISK_CACHE_WRITETHRU,
-    VIR_DOMAIN_DISK_CACHE_WRITEBACK,
-    VIR_DOMAIN_DISK_CACHE_DIRECTSYNC,
-    VIR_DOMAIN_DISK_CACHE_UNSAFE,
-
-    VIR_DOMAIN_DISK_CACHE_LAST
-} virDomainDiskCache;
-
 typedef enum {
     VIR_DOMAIN_DISK_ERROR_POLICY_DEFAULT,
     VIR_DOMAIN_DISK_ERROR_POLICY_STOP,
@@ -451,32 +440,6 @@ typedef enum {
     VIR_DOMAIN_DISK_TRANS_LAST
 } virDomainDiskGeometryTrans;

-typedef enum {
-    VIR_DOMAIN_DISK_IO_DEFAULT = 0,
-    VIR_DOMAIN_DISK_IO_NATIVE,
-    VIR_DOMAIN_DISK_IO_THREADS,
-    VIR_DOMAIN_DISK_IO_URING,
-
-    VIR_DOMAIN_DISK_IO_LAST
-} virDomainDiskIo;
-
-typedef enum {
-    VIR_DOMAIN_DISK_DISCARD_DEFAULT = 0,
-    VIR_DOMAIN_DISK_DISCARD_UNMAP,
-    VIR_DOMAIN_DISK_DISCARD_IGNORE,
-
-    VIR_DOMAIN_DISK_DISCARD_LAST
-} virDomainDiskDiscard;
-
-typedef enum {
-    VIR_DOMAIN_DISK_DETECT_ZEROES_DEFAULT = 0,
-    VIR_DOMAIN_DISK_DETECT_ZEROES_OFF,
-    VIR_DOMAIN_DISK_DETECT_ZEROES_ON,
-    VIR_DOMAIN_DISK_DETECT_ZEROES_UNMAP,
-
-    VIR_DOMAIN_DISK_DETECT_ZEROES_LAST
-} virDomainDiskDetectZeroes;
-
 typedef enum {
     VIR_DOMAIN_DISK_MODEL_DEFAULT = 0,
     VIR_DOMAIN_DISK_MODEL_VIRTIO,
diff --git a/src/conf/virconftypes.h b/src/conf/virconftypes.h
index e07f967814..26cb966194 100644
--- a/src/conf/virconftypes.h
+++ b/src/conf/virconftypes.h
@@ -1,5 +1,5 @@
 /*
- * virconftypes.h: struct typedefs to avoid circular inclusion
+ * virconftypes.h: struct and enum type definitions to avoid circular inclusion
  *
  * Copyright (C) 2006-2019 Red Hat, Inc.
  * Copyright (C) 2006-2008 Daniel P. Berrange
@@ -261,3 +261,40 @@ typedef struct _virDomainXMLOption virDomainXMLOption;
 typedef struct _virDomainXMLPrivateDataCallbacks virDomainXMLPrivateDataCallbacks;

 typedef struct _virDomainXenbusControllerOpts virDomainXenbusControllerOpts;
+
+typedef enum {
+    VIR_DOMAIN_DISK_IO_DEFAULT = 0,
+    VIR_DOMAIN_DISK_IO_NATIVE,
+    VIR_DOMAIN_DISK_IO_THREADS,
+    VIR_DOMAIN_DISK_IO_URING,
+
+    VIR_DOMAIN_DISK_IO_LAST
+} virDomainDiskIo;
+
+typedef enum {
+    VIR_DOMAIN_DISK_CACHE_DEFAULT = 0,
+    VIR_DOMAIN_DISK_CACHE_DISABLE,
+    VIR_DOMAIN_DISK_CACHE_WRITETHRU,
+    VIR_DOMAIN_DISK_CACHE_WRITEBACK,
+    VIR_DOMAIN_DISK_CACHE_DIRECTSYNC,
+    VIR_DOMAIN_DISK_CACHE_UNSAFE,
+
+    VIR_DOMAIN_DISK_CACHE_LAST
+} virDomainDiskCache;
+
+typedef enum {
+    VIR_DOMAIN_DISK_DISCARD_DEFAULT = 0,
+    VIR_DOMAIN_DISK_DISCARD_UNMAP,
+    VIR_DOMAIN_DISK_DISCARD_IGNORE,
+
+    VIR_DOMAIN_DISK_DISCARD_LAST
+} virDomainDiskDiscard;
+
+typedef enum {
+    VIR_DOMAIN_DISK_DETECT_ZEROES_DEFAULT = 0,
+    VIR_DOMAIN_DISK_DETECT_ZEROES_OFF,
+    VIR_DOMAIN_DISK_DETECT_ZEROES_ON,
+    VIR_DOMAIN_DISK_DETECT_ZEROES_UNMAP,
+
+    VIR_DOMAIN_DISK_DETECT_ZEROES_LAST
+} virDomainDiskDetectZeroes;
-- 
2.41.0




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux