]> git.proxmox.com Git - pve-storage.git/commitdiff
add volume_size_info for generic plugin
authorAlexandre Derumier <aderumier@odiso.com>
Fri, 27 Jul 2012 06:00:13 +0000 (08:00 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 27 Jul 2012 08:44:46 +0000 (10:44 +0200)
this use path and file_size_info like before

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
PVE/Storage/Plugin.pm

index 27f004c649afe715a8c8382ec789567accd1b404..a50b602f739f2ffc1702bbc5e1bd5b1a2c76a05f 100644 (file)
@@ -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;