[PATCH 06/10] qemu: cgroup: Avoid reporting errors from inaccessible NFS volumes

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

 



Rather than reporting it and then reseting the error, don't report it in
the first place.
---
 src/qemu/qemu_cgroup.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index 2c0ac30..b37af6d 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -77,7 +77,7 @@ qemuSetImageCgroupInternal(virDomainObjPtr vm,

         VIR_DEBUG("Deny path %s", src->path);

-        ret = virCgroupDenyDevicePath(priv->cgroup, src->path, perms, false);
+        ret = virCgroupDenyDevicePath(priv->cgroup, src->path, perms, true);
     } else {
         if (!src->readonly && !forceReadonly)
             perms |= VIR_CGROUP_DEVICE_WRITE;
@@ -85,7 +85,7 @@ qemuSetImageCgroupInternal(virDomainObjPtr vm,
         VIR_DEBUG("Allow path %s, perms: %s",
                   src->path, virCgroupGetDevicePermsString(perms));

-        ret = virCgroupAllowDevicePath(priv->cgroup, src->path, perms, false);
+        ret = virCgroupAllowDevicePath(priv->cgroup, src->path, perms, true);
     }

     virDomainAuditCgroupPath(vm, priv->cgroup,
@@ -94,14 +94,6 @@ qemuSetImageCgroupInternal(virDomainObjPtr vm,
                              virCgroupGetDevicePermsString(perms),
                              ret == 0);

-    /* Get this for root squash NFS */
-    if (ret < 0 &&
-        virLastErrorIsSystemErrno(EACCES)) {
-        VIR_DEBUG("Ignoring EACCES for %s", src->path);
-        virResetLastError();
-        ret = 0;
-    }
-
     return ret;
 }

-- 
2.6.2

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



[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]