On 04/29/14 09:41, Martin Kletzander wrote: > Based on suggestion from Eric [1], because it might not get cleaned up > before the release, so to avoid potential errors. > > [1] https://www.redhat.com/archives/libvir-list/2014-April/msg00929.html > > Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx> > --- > src/qemu/qemu_domain.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c > index ab19738..f412f49 100644 > --- a/src/qemu/qemu_domain.c > +++ b/src/qemu/qemu_domain.c > @@ -2270,6 +2270,7 @@ qemuDomainCheckDiskPresence(virQEMUDriverPtr driver, > disk = vm->def->disks[i - 1]; > const char *path = virDomainDiskGetSource(disk); > enum virStorageFileFormat format = virDomainDiskGetFormat(disk); > + enum virStorageType type = virDomainDiskGetType(disk); Hmmm, you should probably use virStorageSourceGetActualType here, but this will require to move the call to qemuTranslateDiskSourcePool() in qemuProcessStart() so that it's called before qemuDomainCheckDiskPresence. That way we will be able to catch even when using _TYPE_VOLUME disks that are network backed in disguise. > > if (!path) > continue; > @@ -2277,7 +2278,8 @@ qemuDomainCheckDiskPresence(virQEMUDriverPtr driver, > /* There is no need to check the backing chain for disks > * without backing support, the fact that the file exists is > * more than enough */ > - if (format >= VIR_STORAGE_FILE_NONE && > + if (type != VIR_STORAGE_TYPE_NETWORK && > + format >= VIR_STORAGE_FILE_NONE && > format < VIR_STORAGE_FILE_BACKING && > virFileExists(path)) > continue; > ACK with the suggested changes. Peter
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list