Re: [PATCH] Only check for cluster fs if we're using a filesystem

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

 



On Fri, Jun 08, 2012 at 02:19:08PM +0200, Guido Günther wrote:
> otherwise migration fails for e.g. network filesystems like sheepdog
> with:
> 
>    error: Invalid relative path 'virt-name': Invalid argument
> 
> while we should fail with:
> 
>     Migration may lead to data corruption if disks use cache != none
> 
> References:
> 
>     http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=676328
>     https://www.redhat.com/archives/libvirt-users/2012-May/msg00088.html
> ---
>  src/qemu/qemu_migration.c |   11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
> index b58380b..a1fb962 100644
> --- a/src/qemu/qemu_migration.c
> +++ b/src/qemu/qemu_migration.c
> @@ -840,10 +840,13 @@ qemuMigrationIsSafe(virDomainDefPtr def)
>              !disk->readonly &&
>              disk->cachemode != VIR_DOMAIN_DISK_CACHE_DISABLE) {
>              int cfs;
> -            if ((cfs = virStorageFileIsClusterFS(disk->src)) == 1)
> -                continue;
> -            else if (cfs < 0)
> -                return false;
> +
> +            if (disk->type == VIR_DOMAIN_DISK_TYPE_FILE) {
> +                if ((cfs = virStorageFileIsClusterFS(disk->src)) == 1)
> +                    continue;
> +                else if (cfs < 0)
> +                    return false;
> +            }

ACK

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

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