From 50b9dd3559802160aea923945fc104824fc76064 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 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 --- xlators/features/marker/src/marker-quota.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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