summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker
diff options
context:
space:
mode:
authorvmallika <vmallika@redhat.com>2015-04-15 05:50:01 +0530
committerRaghavendra G <rgowdapp@redhat.com>2015-04-16 08:35:39 +0000
commit50b9dd3559802160aea923945fc104824fc76064 (patch)
treed633086edacd9a2b8b8380896af1215d6ebd7250 /xlators/features/marker
parentc07f166560e5f0b7f3ef400520773b2c7f1f4220 (diff)
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 <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/10239 Tested-by: NetBSD Build System Reviewed-by: Sachin Pandit <spandit@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/features/marker')
-rw-r--r--xlators/features/marker/src/marker-quota.c10
1 files 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: