[Dovecot] Quota again

Stian Jordet liste+dovecot at jordet.net
Fri Apr 14 23:48:28 EEST 2006


Hi,

quota is now working well, except that both quota-fs and quota-maildir
is showing incorrect values. I have to use this patch to get correct
numbers. I _know_ it's totally wrong, and that the cause have to be
something else, I just want to know if this is something with my setup,
or what? With these changes the values are correct (Indeed the quota-fs
is correct, the quota-maildir is at least better...)

Best regards,
Stian

--- quota-fs.c.old      2006-04-14 22:46:17.000000000 +0200
+++ quota-fs.c  2006-04-14 13:55:26.000000000 +0200
@@ -285,9 +285,9 @@
        }
 #endif
        *value_r = (uint64_t)dqblk.dqb_curblocks *
-               (uint64_t)root->mount->blk_size / 1024;
+               (uint64_t)root->mount->blk_size / 1024 / 4096;
        *limit_r = (uint64_t)dqblk.dqb_bsoftlimit *
-               (uint64_t)root->mount->blk_size / 1024;
+               (uint64_t)root->mount->blk_size / 1024 / 4;
        return 1;
 }

--- quota-maildir.c.old 2006-04-14 22:46:17.000000000 +0200
+++ quota-maildir.c     2006-04-14 13:56:02.000000000 +0200
@@ -597,7 +597,7 @@

        if (strcmp(name, QUOTA_NAME_STORAGE) == 0) {
                *limit_r = root->message_bytes_limit / 1024;
-               *value_r = root->total_bytes / 1024;
+               *value_r = root->total_bytes / 10;
        } else if (strcmp(name, QUOTA_NAME_MESSAGES) == 0) {
                *limit_r = root->message_count_limit;
                *value_r = root->total_count;




More information about the dovecot mailing list