]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage/ZFSPoolPlugin.pm
path: corretly implement path to snapshots
[pve-storage.git] / PVE / Storage / ZFSPoolPlugin.pm
index 50045e98411c61d733cc1776ad44ec315317ce83..75704b048fa67cd86887b16c5fa7dbf25d2afc3c 100644 (file)
@@ -141,7 +141,7 @@ sub parse_volname {
 # virtual zfs methods (subclass can overwrite them)
 
 sub path {
-    my ($class, $scfg, $volname) = @_;
+    my ($class, $scfg, $volname, $storeid, $snapname) = @_;
 
     my ($vtype, $name, $vmid) = $class->parse_volname($volname);
 
@@ -154,6 +154,7 @@ sub path {
        } else {
            $path = "/dev/zvol/$scfg->{pool}/$volname";
        }
+       $path .= "\@$snapname" if defined($snapname);
     } else {
        die "$vtype is not allowed in ZFSPool!";
     }