[pve-devel] [PATCH 2/3] sheepdog: sub path: add snapname argument

Alexandre Derumier aderumier at odiso.com
Mon Apr 22 17:57:11 CEST 2013


needed for qemu-img convert from src snapshot

Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/Storage/SheepdogPlugin.pm |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/PVE/Storage/SheepdogPlugin.pm b/PVE/Storage/SheepdogPlugin.pm
index d14cf5b..1262186 100644
--- a/PVE/Storage/SheepdogPlugin.pm
+++ b/PVE/Storage/SheepdogPlugin.pm
@@ -131,13 +131,14 @@ sub parse_volname {
 }
 
 sub path {
-    my ($class, $scfg, $volname, $storeid) = @_;
+    my ($class, $scfg, $volname, $storeid, $snapname) = @_;
 
     my ($vtype, $name, $vmid) = $class->parse_volname($volname);
 
     my $portal = $scfg->{portal};
     my ($server, $port) = split(':', $portal);
     $port = 7000 if !$port;
+    $name .= ':'.$snapname if $snapname;
 
     my $path = "sheepdog:$server:$port:$name";
 
-- 
1.7.10.4



More information about the pve-devel mailing list