From 2a7993d9efeff7cd953ce66f98e954a06aa8fe85 Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Fri, 27 Jul 2012 07:59:20 +0200 Subject: [PATCH] replace file_size_info by volume_size_info. Currently we only find a volume size by using qemu-img info (in file_size_info). This doesn't works with "virtual" storage like sheepdog,rbd,iscsidirect,nexenta. This also doesn't work with classic iscsi direct plugin. So, we need to define a method for each plugin. Signed-off-by: Alexandre Derumier --- PVE/QemuServer.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 1a4daacf..af03bf43 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -1868,7 +1868,6 @@ sub disksize { } else { eval { $storeid = $timeoutid = PVE::Storage::parse_volume_id($volid); - $path = PVE::Storage::path($storecfg, $volid); }; if (my $err = $@) { warn $err; @@ -1887,7 +1886,7 @@ sub disksize { my ($size, $format, $used); - ($size, $format, $used) = PVE::Storage::file_size_info($path, 1); + ($size, $format, $used) = PVE::Storage::volume_size_info($storecfg, $volid, 1); if (!defined($format)) { # got timeout