]> git.proxmox.com Git - pve-storage.git/commitdiff
sheepdog : volume_size_info: parse_volname
authorAlexandre Derumier <aderumier@odiso.com>
Tue, 5 Feb 2013 11:55:54 +0000 (12:55 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 14 Feb 2013 09:21:30 +0000 (10:21 +0100)
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
PVE/Storage/SheepdogPlugin.pm

index e2df17d6a6788dc979f881f0698cb252238661a1..7de0f9252d85d2371f9ec87a7bbd55f71082f15e 100644 (file)
@@ -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;
 
         }