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

Alexandre Derumier aderumier at odiso.com
Sun Aug 5 09:24:13 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 6233fa1..2c69340 100644
--- a/PVE/Storage/ISCSIDirectPlugin.pm
+++ b/PVE/Storage/ISCSIDirectPlugin.pm
@@ -177,7 +177,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