Re: [PATCH v3 6/7] conf: Ignore the volume type disk if its mode is "direct"

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

 



On 19/07/13 20:32, John Ferlan wrote:
From: Osier Yang <jyang@xxxxxxxxxx>

virDomainDiskDefForeachPath is not only used by the security
setting helpers, also used by cgroup setting helpers, so this
is to ignore the volume type disk with mode="direct" for cgroup
setting.
---
  src/conf/domain_conf.c | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 231edb5..770b7cc 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -17533,7 +17533,10 @@ virDomainDiskDefForeachPath(virDomainDiskDefPtr disk,
      size_t depth = 0;
      virStorageFileMetadata *tmp;
- if (!disk->src || disk->type == VIR_DOMAIN_DISK_TYPE_NETWORK)
+    if (!disk->src || disk->type == VIR_DOMAIN_DISK_TYPE_NETWORK ||
+        (disk->type == VIR_DOMAIN_DISK_TYPE_VOLUME &&
+         disk->srcpool &&
+         disk->srcpool->mode == VIR_DOMAIN_DISK_SOURCE_POOL_MODE_DIRECT))
          return 0;
if (iter(disk, disk->src, 0, opaque) < 0)
ack

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