From 61b8ccc9177c6903c79b805771c6ef14f76f887c Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Tue, 5 Feb 2013 12:55:54 +0100 Subject: [PATCH] sheepdog : volume_size_info: parse_volname Signed-off-by: Alexandre Derumier --- 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 e2df17d..7de0f92 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; }