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

Alexandre Derumier aderumier at odiso.com
Thu May 2 05:51:51 CEST 2013


needed for qemu-img convert from src snapshot

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

diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm
index 3340195..81a7b98 100644
--- a/PVE/Storage/RBDPlugin.pm
+++ b/PVE/Storage/RBDPlugin.pm
@@ -224,9 +224,10 @@ sub parse_volname {
 }
 
 sub path {
-    my ($class, $scfg, $volname, $storeid) = @_;
+    my ($class, $scfg, $volname, $storeid, $snapname) = @_;
 
     my ($vtype, $name, $vmid) = $class->parse_volname($volname);
+    $name .= '@'.$snapname if $snapname;
 
     my $monhost = addslashes($scfg->{monhost});
     my $pool =  $scfg->{pool} ? $scfg->{pool} : 'rbd';
-- 
1.7.10.4




More information about the pve-devel mailing list