[pve-devel] [PATCH 30/31] sheepdog: sub path: add snapname argument

Alexandre Derumier aderumier at odiso.com
Tue Jan 22 12:36:28 CET 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 700b486..163a361 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