[Dovecot] dovecot patch for filesystem quota
Geert Hendrickx
ghen at telenet.be
Mon Jan 29 12:46:57 UTC 2007
from a fellow pkgsrc-developer (who is not subscribed to this list)
Geert
----- Forwarded message from Manuel Bouyer <Manuel.Bouyer at lip6.fr> -----
From: Manuel Bouyer <Manuel.Bouyer at lip6.fr>
Message-ID: <20070129115851.GA12360 at asim.lip6.fr>
Date: Mon, 29 Jan 2007 12:58:51 +0100
To: ghen at NetBSD.org
Subject: dovecot patch for filesystem quota
User-Agent: Mutt/1.5.13 (2006-08-11)
Hi,
I've installed dovecot on a mail server with filesystem quota, and
I noticed that dovect reports wrong informations for quotas to the
client (the ratio is correct though, so it will properly detect when
quota is nearly full anyway). The attached patch fixes it for me, and
I suspect is also correct for others BSDs. I don't know for AIX.
--- src/plugins/quota/quota-fs.c.orig 2007-01-28 22:35:32.000000000 +0100
+++ src/plugins/quota/quota-fs.c 2007-01-28 22:36:12.000000000 +0100
@@ -250,8 +250,8 @@
quota_set_error(_root->setup->quota, "Internal quota error");
return -1;
}
- *value_r = (uint64_t)dqblk.dqb_curblocks * 1024 / DEV_BSIZE;
- *limit_r = (uint64_t)dqblk.dqb_bsoftlimit * 1024 / DEV_BSIZE;
+ *value_r = (uint64_t)dqblk.dqb_curblocks * DEV_BSIZE / 1024;
+ *limit_r = (uint64_t)dqblk.dqb_bsoftlimit * DEV_BSIZE / 1024;
#else
/* Solaris */
if (root->mount->fd == -1)
----- End forwarded message -----
More information about the dovecot
mailing list