[libvirt] [PATCH 2/3] qemu: process: Move handling of non-backing files into qemuDomainDetermineDiskChain

Peter Krempa pkrempa at redhat.com
Thu Nov 30 12:44:48 UTC 2017


On Wed, Nov 29, 2017 at 21:25:45 -0500, John Ferlan wrote:
> 
> 
> On 11/24/2017 07:21 AM, Peter Krempa wrote:
> > Until now we would skip loading of the backing chain for files which
> > don't support backing chains only when starting up the VM. Move the
> > check from qemuProcessPrepareHostStorage with some adaptations so that's
> > always applied.
> > ---
> >  src/qemu/qemu_domain.c  | 17 +++++++++++++++++
> >  src/qemu/qemu_process.c | 10 ----------
> >  2 files changed, 17 insertions(+), 10 deletions(-)
> > 
> 
> Does it matter or should the check go before the
> virStorageSourceBackingStoreClear... Up through this point we did it
> before anyway.

Well. It does not matter at this precise point. If the file does not
exist (since it's the top level image), we would fail and clearing or
not clearing of the terminator does not matter.

It simplifies the code for the next patch though. If we are nuking the
rest of the backing chain (as we do in all cases today), we want to nuke
the rest of the chain for the raw disk (since it would be invalid).

After that we will always need to terminate the chain.

So yes, change in the ordering is desired.

> 
> Reviewed-by: John Ferlan <jferlan at redhat.com>
> 
> (for the code regardless of your decision on placement)
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20171130/fb2cb515/attachment-0001.sig>


More information about the libvir-list mailing list