summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker
diff options
context:
space:
mode:
authorvmallika <vmallika@redhat.com>2015-04-15 05:50:01 +0530
committerVijay Bellur <vbellur@redhat.com>2015-04-24 04:47:32 -0700
commit8a44eb8e3be7ddccfb3f51f30e16b7c2334428c9 (patch)
treeddd6d6057bb5c8ea8a908822e66effe25755c1f3 /xlators/features/marker
parent5bf1e64744b6363e89222a4e10948b2253da202a (diff)
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 <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> Change-Id: I3245ee62fd69b60ec56ebe28043c273dbb58dd58 BUG: 1212348 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/10265 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@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 c6cf470..e99dfe2 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: