On 06/19/2014 07:59 AM, Peter Krempa wrote:
Introduce flag for the block commit API to allow the commit operation
to
leave the chain relatively addressed. Also adds a virsh switch to enable
this behavior.
---
include/libvirt/libvirt.h.in | 4 ++++
src/libvirt.c | 5 +++++
tools/virsh-domain.c | 7 +++++++
tools/virsh.pod | 5 +++--
4 files changed, 19 insertions(+), 2 deletions(-)
This patch can go in now, in order to make the freeze for 1.2.6. That
is, we can commit to this API even if we can't implement it in qemu
until Jeff's patches are in.
+++ b/src/libvirt.c
@@ -19879,6 +19879,11 @@ virDomainBlockRebase(virDomainPtr dom, const char *disk,
* VIR_DOMAIN_BLOCK_COMMIT_DELETE, then this command will unlink all files
* that were invalidated, after the commit successfully completes.
*
+ * If @flags contains VIR_DOMAIN_BLOCK_COMMIT_RELATIVE, the name recorded
+ * into the overlay of the @top image as path to the new backing file
s/as path/as the path/
+ * will be kept relative to other images in case the backing chain
was
+ * using relative names.
Should we also mention what happens if there is no overlay of @top (that
is, when @top is NULL or explicitly mentions the active layer)? Is this
flag then silently ignored, or an explicit error?
+ {.name = "keep-relative",
+ .type = VSH_OT_BOOL,
+ .help = N_("keep the backing chain relative if it was relatively "
+ "referenced if it was before")
s/if it was before/before/
+files at the successful completion of the commit operation. When
the
+I<--keep-relative> flag is used, the backing file paths will be kept relative.
s/relative./relative, if possible./
So even though I'd like to commit to this API, it's probably enough
changes to post a v6 to make sure the grammar still reads well.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org