]> git.proxmox.com Git - qemu-server.git/commitdiff
qemu-img convert: use cache=none for ZFS only
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 26 Mar 2018 08:15:51 +0000 (10:15 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 26 Mar 2018 09:38:40 +0000 (11:38 +0200)
since this requires O_DIRECT support by the underlying storage, which
might not be available.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
PVE/QemuServer.pm

index 91a2bfc861524ea14af869cae9bee4c420f1a365..fe85f395b7e68e96e900eeca4e523143cf795e6d 100644 (file)
@@ -6146,7 +6146,8 @@ sub qemu_img_convert {
        my $cmd = [];
        push @$cmd, '/usr/bin/qemu-img', 'convert', '-p', '-n';
        push @$cmd, '-s', $snapname if($snapname && $src_format eq "qcow2");
-       push @$cmd, '-t', 'none', '-T', 'none';
+       push @$cmd, '-t', 'none' if $dst_scfg->{type} eq 'zfspool';
+       push @$cmd, '-T', 'none' if $src_scfg->{type} eq 'zfspool';
        push @$cmd, '-f', $src_format, '-O', $dst_format, $src_path;
        if ($is_zero_initialized) {
            push @$cmd, "zeroinit:$dst_path";