]> git.proxmox.com Git - pve-storage.git/commitdiff
use integer size in rbd size parameter
authorDietmar Maurer <dietmar@proxmox.com>
Mon, 25 Mar 2013 11:51:26 +0000 (12:51 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 25 Mar 2013 11:55:09 +0000 (12:55 +0100)
PVE/Storage/RBDPlugin.pm

index e6259994ea454ef6735315514b9b3795e9cbe2ce..fe013c585b23cc3421be17bb982174193acffb71 100644 (file)
@@ -332,7 +332,7 @@ sub alloc_image {
 
     $name = &$find_free_diskname($storeid, $scfg, $vmid);
 
-    my $cmd = &$rbd_cmd($scfg, $storeid, 'create', '--format' , 2, '--size', ($size/1024), $name);
+    my $cmd = &$rbd_cmd($scfg, $storeid, 'create', '--format' , 2, '--size', int(($size+1023)/1024), $name);
     run_command($cmd, errmsg => "rbd create $name' error", errfunc => sub {});
 
     return $name;