From: Timo Sirainen Date: Mon, 5 Jul 2010 11:56:28 +0000 (+0100) Subject: quota-fs: Removed rq_active check from rquota usage. X-Git-Tag: 2.0.rc2~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=548a518357ff77755e458410a217e872c6cf3455;p=thirdparty%2Fdovecot%2Fcore.git 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. --HG-- branch : HEAD --- diff --git a/src/plugins/quota/quota-fs.c b/src/plugins/quota/quota-fs.c index 9d48b0fb3d..22e316a837 100644 --- a/src/plugins/quota/quota-fs.c +++ b/src/plugins/quota/quota-fs.c @@ -381,22 +381,20 @@ static int do_rquota_user(struct fs_quota_root *root, bool bytes, /* 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 @@ do_rquota_group(struct fs_quota_root *root ATTR_UNUSED, bool bytes ATTR_UNUSED, /* 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; }