[pve-devel] [PATCH 27/44] sheepdog : volume_size_info: parse_volname

Alexandre Derumier aderumier at odiso.com
Tue Feb 5 12:55:54 CET 2013


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

diff --git a/PVE/Storage/SheepdogPlugin.pm b/PVE/Storage/SheepdogPlugin.pm
index 6e0c293..d9e46e7 100644
--- a/PVE/Storage/SheepdogPlugin.pm
+++ b/PVE/Storage/SheepdogPlugin.pm
@@ -356,6 +356,9 @@ sub deactivate_volume {
 sub volume_size_info {
     my ($class, $scfg, $storeid, $volname, $timeout) = @_;
 
+    my ($vtype, $name, $vmid, $basename, $basevmid, $isBase) =
+	$class->parse_volname($volname);
+
     my $size = undef;
 
     my $cmd = &$collie_cmd($scfg, 'vdi', 'list', '-r');
@@ -363,7 +366,7 @@ sub volume_size_info {
     run_command($cmd, outfunc => sub {
         my $line = shift;
         $line = trim($line);
-        if ($line =~ /(=|c) $volname\s+(\d+)\s+(\d+)\s(\d+)\s(\d+)\s/) {
+        if ($line =~ /(=|c) $name\s+(\d+)\s+(\d+)\s(\d+)\s(\d+)\s/) {
             $size = $3;
 
         }
-- 
1.7.10.4




More information about the pve-devel mailing list