[pve-devel] [PATCH] sheepdog: fix find_next_volume with storeid != 'sheepdog', find display volume size

Alexandre Derumier aderumier at odiso.com
Fri Jun 21 14:40:52 CEST 2013


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

diff --git a/PVE/Storage/SheepdogPlugin.pm b/PVE/Storage/SheepdogPlugin.pm
index 1262186..ab25f98 100644
--- a/PVE/Storage/SheepdogPlugin.pm
+++ b/PVE/Storage/SheepdogPlugin.pm
@@ -62,7 +62,7 @@ sub sheepdog_ls {
 	if ($line =~ /(=|c) ((vm|base)-(\d+)-\S+)\s+(\d+)\s+(\d+)\s(\d+)\s(\d+)\s(\d+)\s(\S+)\s(\d+)/) {
 	    my $image = $2;
 	    my $owner = $4;
-	    my $size = $5;
+	    my $size = $6;
 	    my $idvdi = $10;
 	    my $parentid = $relationship->{$idvdi}->{parent} if $relationship->{$idvdi}->{parent};
 	    my $parent = $relationship->{$parentid}->{name} if $parentid;
@@ -149,7 +149,7 @@ my $find_free_diskname = sub {
     my ($storeid, $scfg, $vmid) = @_;
 
     my $sheepdog = sheepdog_ls($scfg, $storeid);
-    my $dat = $sheepdog->{sheepdog};
+    my $dat = $sheepdog->{$storeid};
     my $disk_ids = {};
 
     foreach my $image (keys %$dat) {
-- 
1.7.10.4




More information about the pve-devel mailing list