From 8a44eb8e3be7ddccfb3f51f30e16b7c2334428c9 Mon Sep 17 00:00:00 2001 From: vmallika Date: Wed, 15 Apr 2015 05:50:01 +0530 Subject: quota/marker: fix inode quota healing after glusterfs upgrade This is a backport of http://review.gluster.org/10239 > There is a problem during upgrade where, inode quotas are not healed in > the contri xattrs. > Healing happens if contri xattrs are missing. > But healing doesn't happen if contri xattrs are present and inode quota > values are missing in the contri xattrs. > > This patch fixes the problem > > Change-Id: I6c88b74b5bb333a97c5419e24cc4ada82839f474 > BUG: 1211808 > Signed-off-by: vmallika > Reviewed-on: http://review.gluster.org/10239 > Tested-by: NetBSD Build System > Reviewed-by: Sachin Pandit > Tested-by: Gluster Build System > Reviewed-by: Raghavendra G > Tested-by: Raghavendra G Change-Id: I3245ee62fd69b60ec56ebe28043c273dbb58dd58 BUG: 1212348 Signed-off-by: vmallika Reviewed-on: http://review.gluster.org/10265 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/features/marker/src/marker-quota.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'xlators') diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c index c6cf470e5a4..e99dfe2331e 100644 --- a/xlators/features/marker/src/marker-quota.c +++ b/xlators/features/marker/src/marker-quota.c @@ -2125,9 +2125,13 @@ mq_are_xattrs_set (xlator_t *this, loc_t *loc, gf_boolean_t *result, *objects = _gf_true; } - if (!loc_is_root(loc) && !dict_get (rsp_dict, contri_key)) { - *result = _gf_false; - goto out; + if (!loc_is_root(loc)) { + ret = quota_dict_get_meta (rsp_dict, contri_key, &meta); + if (ret < 0) { + ret = 0; + *result = _gf_false; + goto out; + } } out: -- cgit