[Dovecot] Filesystem quota
Timo Sirainen
tss at iki.fi
Sun Apr 9 18:07:49 EEST 2006
On Mon, 2006-04-03 at 00:34 +0200, Stian Jordet wrote:
> søn, 02,.04.2006 kl. 20.04 +0200, skrev Stian Jordet:
> > søn, 02,.04.2006 kl. 20.41 +0300, skrev Timo Sirainen:
> > > Will this patch help?
> > But still a little (!) problem:
> >
> > a getquota ""
> > * QUOTA "" (STORAGE 1518927872 80000000)
> > a OK Getquota completed.
>
> The first number is 4096 times to big, while the second one is four
> times to big... Weird, but it happens on all accounts.
Does the patch below help?
Index: src/plugins/quota/quota-fs.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/quota/quota-fs.c,v
retrieving revision 1.11
diff -u -r1.11 quota-fs.c
--- src/plugins/quota/quota-fs.c 2 Apr 2006 17:42:30 -0000 1.11
+++ src/plugins/quota/quota-fs.c 9 Apr 2006 15:05:19 -0000
@@ -284,8 +284,10 @@
return -1;
}
#endif
- *value_r = dqblk.dqb_curblocks * root->mount->blk_size / 1024;
- *limit_r = dqblk.dqb_bsoftlimit * root->mount->blk_size / 1024;
+ *value_r = (uint64_t)dqblk.dqb_curblocks *
+ (uint64_t)root->mount->blk_size / 1024;
+ *limit_r = (uint64_t)dqblk.dqb_bsoftlimit *
+ (uint64_t)root->mount->blk_size / 1024;
return 1;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20060409/ce745ef4/attachment.pgp
More information about the dovecot
mailing list