[pve-devel] [PATCH 2/7] add volume_size_info for generic plugin

Alexandre Derumier aderumier at odiso.com
Fri Jul 27 08:00:13 CEST 2012


this use path and file_size_info like before

Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/Storage/Plugin.pm |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/PVE/Storage/Plugin.pm b/PVE/Storage/Plugin.pm
index 27f004c..a50b602 100644
--- a/PVE/Storage/Plugin.pm
+++ b/PVE/Storage/Plugin.pm
@@ -481,6 +481,13 @@ sub file_size_info {
     return wantarray ? ($size, $format, $used) : $size;
 }
 
+sub volume_size_info {
+    my ($class, $scfg, $storeid, $volname, $timeout) = @_;
+    my $path = $class->path($scfg, $volname);
+    return file_size_info($path, $timeout);
+
+}
+
 sub list_images {
     my ($class, $storeid, $scfg, $vmid, $vollist, $cache) = @_;
 
@@ -585,4 +592,5 @@ sub check_connection {
     return 1;
 }
 
+
 1;
-- 
1.7.2.5




More information about the pve-devel mailing list