dovecot-2.0: quota-fs: Removed rq_active check from rquota usage.

dovecot at dovecot.org dovecot at dovecot.org
Mon Jul 5 14:56:31 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/c187993c96f2
changeset: 11728:c187993c96f2
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Jul 05 12:56:28 2010 +0100
description:
quota-fs: Removed rq_active check from rquota usage.
Apparently it's not set by all implementations, and other tools also ignore it.
If it actually is necessary in some systems, this could be added back and
enabled optionally.

diffstat:

 src/plugins/quota/quota-fs.c |  48 ++++++++++++++++++++++--------------------------
 1 files changed, 22 insertions(+), 26 deletions(-)

diffs (71 lines):

diff -r 42dfcf9c896b -r c187993c96f2 src/plugins/quota/quota-fs.c
--- a/src/plugins/quota/quota-fs.c	Mon Jul 05 12:35:52 2010 +0100
+++ b/src/plugins/quota/quota-fs.c	Mon Jul 05 12:56:28 2010 +0100
@@ -381,22 +381,20 @@
 		/* convert the results from blocks to bytes */
 		const rquota *rq = &result.getquota_rslt_u.gqr_rquota;
 
-		if (rq->rq_active) {
-			if (bytes) {
-				*value_r = (uint64_t)rq->rq_curblocks *
-					(uint64_t)rq->rq_bsize;
-				*limit_r = (uint64_t)rq->rq_bsoftlimit *
-					(uint64_t)rq->rq_bsize;
-			} else {
-				*value_r = rq->rq_curfiles;
-				*limit_r = rq->rq_fsoftlimit;
-			}
+		if (bytes) {
+			*value_r = (uint64_t)rq->rq_curblocks *
+				(uint64_t)rq->rq_bsize;
+			*limit_r = (uint64_t)rq->rq_bsoftlimit *
+				(uint64_t)rq->rq_bsize;
+		} else {
+			*value_r = rq->rq_curfiles;
+			*limit_r = rq->rq_fsoftlimit;
 		}
 		if (root->root.quota->set->debug) {
-			i_debug("quota-fs: uid=%s, value=%llu, "
-				"limit=%llu, active=%d", dec2str(root->uid),
+			i_debug("quota-fs: uid=%s, value=%llu, limit=%llu",
+				dec2str(root->uid),
 				(unsigned long long)*value_r,
-				(unsigned long long)*limit_r, rq->rq_active);
+				(unsigned long long)*limit_r);
 		}
 		return 1;
 	}
@@ -483,22 +481,20 @@
 		/* convert the results from blocks to bytes */
 		const rquota *rq = &result.getquota_rslt_u.gqr_rquota;
 
-		if (rq->rq_active) {
-			if (bytes) {
-				*value_r = (uint64_t)rq->rq_curblocks *
-					(uint64_t)rq->rq_bsize;
-				*limit_r = (uint64_t)rq->rq_bsoftlimit *
-					(uint64_t)rq->rq_bsize;
-			} else {
-				*value_r = rq->rq_curfiles;
-				*limit_r = rq->rq_fsoftlimit;
-			}
+		if (bytes) {
+			*value_r = (uint64_t)rq->rq_curblocks *
+				(uint64_t)rq->rq_bsize;
+			*limit_r = (uint64_t)rq->rq_bsoftlimit *
+				(uint64_t)rq->rq_bsize;
+		} else {
+			*value_r = rq->rq_curfiles;
+			*limit_r = rq->rq_fsoftlimit;
 		}
 		if (root->root.quota->set->debug) {
-			i_debug("quota-fs: gid=%s, value=%llu, "
-				"limit=%llu, active=%d", dec2str(root->gid),
+			i_debug("quota-fs: gid=%s, value=%llu, limit=%llu",
+				dec2str(root->gid),
 				(unsigned long long)*value_r,
-				(unsigned long long)*limit_r, rq->rq_active);
+				(unsigned long long)*limit_r);
 		}
 		return 1;
 	}


More information about the dovecot-cvs mailing list