[Dovecot] Possible Bug in quota-fs.c
Hi,
I'm using filesystem quotas with dovecot 1.0rc22 on my Linux 2.4.27 box. The quota limit gets correctly reported in kilobytes to the client but the amount of used space is reported in megabytes.
In quota-fs.c I noticed that only the currently used space is divided by 1024:
Line 241:
*value_r = dqblk.dqb_curblocks / 1024;
*limit_r = dqblk.dqb_bsoftlimit;
After removing /1024 everything works fine.
regards,
Martin
On Sun, 2007-02-18 at 21:49 +0100, Martin Konopka wrote:
Hmm. Does it have _LINUX_QUOTA_VERSION defined to 1? You could check that by eg. adding somewhere to the quota-fs.c code:
#if _LINUX_QUOTA_VERSION == 1 #error yes its 1 #endif
I think the /1024 is correct for 2.6 kernel, or at least I think several people have reported it working correctly.. So if 2.4 kernel is quota version 1, then I'll add #ifdef to not do the /1024 with it.
I took this from kernel menuconfig for quota v1:
This quota format was (is) used by kernels earlier than 2.4.22. If you have quota working and you don't want to convert to new quota format say Y here.
Láďa
-----Original Message----- From: dovecot-bounces@dovecot.org [mailto:dovecot-bounces@dovecot.org] On Behalf Of Martin Konopka Sent: Monday, February 19, 2007 10:15 PM To: Dovecot Mailing List Subject: Re: [Dovecot] Possible Bug in quota-fs.c
Am Montag, 19. Februar 2007 21:14 schrieb Timo Sirainen:
Kernel 2.4 has indeed quota version 1:
quota-fs.c:333:2: #error yes its 1 make: *** [quota-fs.lo] Fehler 1
I think I will update to 2.6 soon...
participants (3)
-
Láďa
-
Martin Konopka
-
Timo Sirainen