From cdcbfcd3900ad450023c8b3d06174dfb81644788 Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Fri, 15 Apr 2011 07:05:10 +0000 Subject: features/marker-quota: Use the actual disk-space consumed instead of ia_size returned in iatt for calculation of sizes. Signed-off-by: Raghavendra G Signed-off-by: Anand Avati BUG: 2760 (Quota: stripe volume not showing the quota size properly) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2760 --- xlators/features/marker/src/marker-quota.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xlators/features/marker/src/marker-quota.c') diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c index c20fc4f89..cc109fecb 100644 --- a/xlators/features/marker/src/marker-quota.c +++ b/xlators/features/marker/src/marker-quota.c @@ -1166,7 +1166,7 @@ quota_update_inode_contribution (call_frame_t *frame, void *cookie, ctx->size = ntoh64 (*size); } else - ctx->size = buf->ia_size; + ctx->size = buf->ia_blocks * 512; ret = dict_get_bin (dict, contri_key, (void **) &contri); if (ret < 0) @@ -1582,7 +1582,7 @@ inspect_file_xattr (xlator_t *this, LOCK (&ctx->lock); { - ctx->size = buf.ia_size; + ctx->size = 512 * buf.ia_blocks; } UNLOCK (&ctx->lock); @@ -1604,7 +1604,7 @@ inspect_file_xattr (xlator_t *this, ret = validate_inode_size_contribution (this, loc, ctx, contribution); } else - initiate_quota_txn (this, loc); + initiate_quota_txn (this, loc); } out: -- cgit