summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2011-04-15 07:05:10 +0000
committerAnand Avati <avati@gluster.com>2011-04-15 23:06:32 -0700
commitcdcbfcd3900ad450023c8b3d06174dfb81644788 (patch)
treec7ed65a43c55c83414973895eca0db70c4655ca6 /xlators
parentda66edbe927152ba12c9a702fd157a45a3f3cb42 (diff)
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 <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2760 (Quota: stripe volume not showing the quota size properly) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2760
Diffstat (limited to 'xlators')
-rw-r--r--xlators/features/marker/src/marker-quota.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c
index c20fc4f89c0..cc109fecbc5 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: