summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker
diff options
context:
space:
mode:
authorvmallika <vmallika@redhat.com>2015-07-10 13:29:13 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2015-07-12 23:53:27 -0700
commit1509f6f2815cb75ecf45abef6d823c8cb30ed47b (patch)
tree7d64fb190f78dd0eb448498543dfd93be150cd74 /xlators/features/marker
parent4cd60d5456c2ff0fe0455c8d1d534776bb8269c4 (diff)
quota/marker: fix spurious failure afr-quota-xattr-mdata-heal.t
This is a backport of http://review.gluster.org/#/c/11583 During quota-update process if inode info is present in size-xattr and missing in contri-xattrs, then in function '_mq_get_metadata', we set contri-size as zero (on error -2, which means usage info present, but inode info missing). With this we are calculating wrong delta and updating the same. With this patch we are ignoring errors if inode info in xattrs are missing > Change-Id: I7940a0e299b8bb425b5b43746b1f13f775c7fb92 > BUG: 1241153 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: Ie85fa84b5362ae179cc43402bd6a3a6d96a04b81 BUG: 1241831 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11614 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators/features/marker')
-rw-r--r--xlators/features/marker/src/marker-quota.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c
index 97946f8ec82..c6def62a016 100644
--- a/xlators/features/marker/src/marker-quota.c
+++ b/xlators/features/marker/src/marker-quota.c
@@ -2095,9 +2095,9 @@ _quota_dict_get_meta (xlator_t *this, dict_t *dict, char *key,
priv = this->private;
- ret = quota_dict_get_meta (dict, key, meta);
+ ret = quota_dict_get_inode_meta (dict, key, meta);
if (ret == -2 && (priv->feature_enabled & GF_INODE_QUOTA) == 0) {
- /* quota_dict_get_meta returns -2 if
+ /* quota_dict_get_inode_meta returns -2 if
* inode quota xattrs are not present.
* if inode quota self heal is turned off,
* then we should skip healing inode quotas
@@ -2466,9 +2466,8 @@ _mq_get_metadata (xlator_t *this, loc_t *loc, quota_meta_t *contri,
if (size) {
if (loc->inode->ia_type == IA_IFDIR) {
- ret = _quota_dict_get_meta (this, rsp_dict,
- QUOTA_SIZE_KEY, &meta,
- IA_IFDIR, _gf_true);
+ ret = quota_dict_get_meta (rsp_dict, QUOTA_SIZE_KEY,
+ &meta);
if (ret < 0) {
gf_log (this->name, GF_LOG_ERROR,
"dict_get failed.");
@@ -2486,8 +2485,7 @@ _mq_get_metadata (xlator_t *this, loc_t *loc, quota_meta_t *contri,
}
if (contri && !loc_is_root(loc)) {
- ret = _quota_dict_get_meta (this, rsp_dict, contri_key, &meta,
- loc->inode->ia_type, _gf_false);
+ ret = quota_dict_get_meta (rsp_dict, contri_key, &meta);
if (ret < 0) {
contri->size = 0;
contri->file_count = 0;