[libvirt] [PATCH v4 12/15] Revert "_virLockManagerLockDaemonPrivate: Move @hasRWDisks into dom union"

Michal Privoznik posted 15 patches 6 years ago
[libvirt] [PATCH v4 12/15] Revert "_virLockManagerLockDaemonPrivate: Move @hasRWDisks into dom union"
Posted by Michal Privoznik 6 years ago
This reverts commit aaf34cb9013d6d746f4edf9807408cb9dfbcf01d.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 src/locking/lock_driver_lockd.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/locking/lock_driver_lockd.c b/src/locking/lock_driver_lockd.c
index 268676c407..22a5a97913 100644
--- a/src/locking/lock_driver_lockd.c
+++ b/src/locking/lock_driver_lockd.c
@@ -63,8 +63,6 @@ struct _virLockManagerLockDaemonPrivate {
             char *name;
             int id;
             pid_t pid;
-
-            bool hasRWDisks;
         } dom;
 
         struct {
@@ -76,6 +74,8 @@ struct _virLockManagerLockDaemonPrivate {
 
     size_t nresources;
     virLockManagerLockDaemonResourcePtr resources;
+
+    bool hasRWDisks;
 };
 
 
@@ -585,7 +585,7 @@ static int virLockManagerLockDaemonAddResource(virLockManagerPtr lock,
             if (!driver->autoDiskLease) {
                 if (!(flags & (VIR_LOCK_MANAGER_RESOURCE_SHARED |
                                VIR_LOCK_MANAGER_RESOURCE_READONLY)))
-                    priv->t.dom.hasRWDisks = true;
+                    priv->hasRWDisks = true;
                 return 0;
             }
 
@@ -731,7 +731,7 @@ static int virLockManagerLockDaemonAcquire(virLockManagerPtr lock,
 
     if (priv->type == VIR_LOCK_MANAGER_OBJECT_TYPE_DOMAIN &&
         priv->nresources == 0 &&
-        priv->t.dom.hasRWDisks &&
+        priv->hasRWDisks &&
         driver->requireLeaseForDisks) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
                        _("Read/write, exclusive access, disks were present, but no leases specified"));
-- 
2.18.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list