[pve-devel] [PATCH 6/6] ISCSIDirect : volume_size_info

Alexandre Derumier aderumier at odiso.com
Sun Aug 5 10:03:30 CEST 2012


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

diff --git a/PVE/Storage/ISCSIDirectPlugin.pm b/PVE/Storage/ISCSIDirectPlugin.pm
index a92da5b..9161f64 100644
--- a/PVE/Storage/ISCSIDirectPlugin.pm
+++ b/PVE/Storage/ISCSIDirectPlugin.pm
@@ -182,7 +182,10 @@ sub deactivate_volume {
 sub volume_size_info {
     my ($class, $scfg, $storeid, $volname, $timeout) = @_;
 
-    return undef;
+    my $vollist = iscsi_ls($scfg,$storeid);
+    my $info = $vollist->{$storeid}->{$volname};
+
+    return $info->{size};
 }
 
 1;
-- 
1.7.2.5




More information about the pve-devel mailing list