[vhffs-dev] [2015] fixed a bug when repository quota * 1M / KiB does not give a round value |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 2015
Author: gradator
Date: 2012-02-18 02:29:44 +0100 (Sat, 18 Feb 2012)
Log Message:
-----------
fixed a bug when repository quota * 1M / KiB does not give a round value
Modified Paths:
--------------
trunk/vhffs-robots/src/repository_quota.pl
Modified: trunk/vhffs-robots/src/repository_quota.pl
===================================================================
--- trunk/vhffs-robots/src/repository_quota.pl 2012-02-18 01:06:34 UTC (rev 2014)
+++ trunk/vhffs-robots/src/repository_quota.pl 2012-02-18 01:29:44 UTC (rev 2015)
@@ -51,8 +51,8 @@
my $groupsusingrepo = {};
foreach my $repo ( @{$repos} ) {
- my $setblocks = ($repo->get_quota*1000000)/1024; # Filesystem quota block = 1024B
- my $setinodes = ($repo->get_quota*1000000)/4096; # Filesystem block = 4096B
+ my $setblocks = ceil( ($repo->get_quota*1000000)/1024 ); # Filesystem quota block = 1024B
+ my $setinodes = ceil( ($repo->get_quota*1000000)/4096 ); # Filesystem block = 4096B
$groupsusingrepo->{ $repo->get_owner_gid } = 1;
my ($blocks,$softblocks,$hardblocks,undef,undef,$softinodes,$hardinodes,undef) = Quota::query($dev, $repo->get_owner_gid, 1);