[PATCHv5 09/28] util: storage: Copy parent's disk metadata to backing chain elements

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

 



When discovering a disk backing chain the parent disk's metadata need to
be populated into the guest images so that each piece of the backing
chain contains a copy of those. This will allow us to refactor the
security driver so that it will not need to carry around the original
disk definition.
---
 src/util/virstoragefile.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index cdbe24b..591c2fa 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -2334,9 +2334,17 @@ virStorageSourceNewFromBacking(virStorageSourcePtr parent)
                 }
             }
         }
+
+        /* copy parent's labelling and other top level stuff */
+        if (virStorageSourceInitChainElement(ret, parent, false) < 0)
+            goto error;
     }

     return ret;
+
+ error:
+    virStorageSourceFree(ret);
+    return NULL;
 }


-- 
1.9.3

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