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 e27384d..deb5126 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -2155,9 +2155,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