From d90b87eed2fa68df5afcebbc54747e96f6d76cfb Mon Sep 17 00:00:00 2001 From: vmallika Date: Thu, 15 Oct 2015 12:41:13 +0530 Subject: quota: add version to quota xattrs When a quota is disable and the clean-up process terminated without completely cleaning-up the quota xattrs. Now when quota is enabled again, this can mess-up the accounting A version number is suffixed for all quota xattrs and this version number is specific to marker xaltor, i.e when quota xattrs are requested by quotad/client marker will remove the version suffix in the key before sending the response Change-Id: I1ca2c11460645edba0f6b68db70d476d8d26e1eb BUG: 1272411 Signed-off-by: vmallika Reviewed-on: http://review.gluster.org/12386 Tested-by: NetBSD Build System Reviewed-by: Krishnan Parthasarathi Tested-by: Gluster Build System Reviewed-by: Manikandan Selvaganesh Reviewed-by: Raghavendra G --- xlators/features/quota/src/quota.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'xlators/features/quota/src/quota.c') diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c index f0ee8797206..53753559c5b 100644 --- a/xlators/features/quota/src/quota.c +++ b/xlators/features/quota/src/quota.c @@ -874,6 +874,12 @@ quota_build_ancestry (inode_t *inode, quota_ancestry_built_t ancestry_cbk, goto err; } + op_ret = dict_set_int8 (xdata_req, QUOTA_LIMIT_OBJECTS_KEY, 1); + if (op_ret < 0) { + op_errno = -op_ret; + goto err; + } + op_ret = dict_set_int8 (xdata_req, GET_ANCESTRY_DENTRY_KEY, 1); if (op_ret < 0) { op_errno = -op_ret; -- cgit