[pve-devel] [PATCH] bug-fix for size output

Wolfgang Link w.link at proxmox.com
Thu Feb 12 11:38:17 CET 2015


Signed-off-by: Wolfgang Link <w.link at proxmox.com>
---
 PVE/Storage/ZFSPoolPlugin.pm |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/PVE/Storage/ZFSPoolPlugin.pm b/PVE/Storage/ZFSPoolPlugin.pm
index 7dc7d3e..8584bac 100644
--- a/PVE/Storage/ZFSPoolPlugin.pm
+++ b/PVE/Storage/ZFSPoolPlugin.pm
@@ -97,15 +97,17 @@ sub zfs_parse_zvol_list {
 	    my @parts = split /\//, $1;
 	    my $name = pop @parts;
 	    my $pool = join('/', @parts);
+	    my $size = $2;
+	    my $origin = $3;
 
 	    next unless $name =~ m!^(\w+)-(\d+)-(\w+)-(\d+)$!;
 	    $name = $pool . '/' . $name;
 
 	    $zvol->{pool} = $pool;
 	    $zvol->{name} = $name;
-	    $zvol->{size} = zfs_parse_size($2);
+	    $zvol->{size} = zfs_parse_size($size);
 	    if ($3 !~ /^-$/) {
-		$zvol->{origin} = $3;
+		$zvol->{origin} = $origin;
 	    }
 	    push @$list, $zvol;
 	}
-- 
1.7.10.4





More information about the pve-devel mailing list