summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/src
diff options
context:
space:
mode:
authorvmallika <vmallika@redhat.com>2015-07-10 16:04:16 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2015-07-13 21:02:02 -0700
commit19ce68e9000148586f4af8f14ee8b71ae38088c0 (patch)
tree0645d64003edb6321013dc4c7bd8c30d600161f5 /xlators/features/marker/src
parent74717225b3203aab546844a1c16d495fc4efb0bb (diff)
quota/marker: inspect file/dir invoked without having quota xattrs requested
This is a backport of http://review.gluster.org/#/c/11616/ In a lookup and build ancestry quota xattrs are not requested, it gives wrong assumption that quota xattrs are missing and tries to do healing process > Change-Id: I7135101ec0edc72a6310dbb304227eaa3b16cb46 > BUG: 1207735 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: I286d9634e8afeab691d8f4caa70865adfe8b184a BUG: 1229282 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11619 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators/features/marker/src')
-rw-r--r--xlators/features/marker/src/marker.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c
index c7c9fd38c1a..db6943c80ca 100644
--- a/xlators/features/marker/src/marker.c
+++ b/xlators/features/marker/src/marker.c
@@ -2719,6 +2719,10 @@ marker_lookup (call_frame_t *frame, xlator_t *this,
priv = this->private;
+ xattr_req = xattr_req ? dict_ref (xattr_req) : dict_new ();
+ if (!xattr_req)
+ goto err;
+
if (priv->feature_enabled == 0)
goto wind;
@@ -2732,15 +2736,21 @@ marker_lookup (call_frame_t *frame, xlator_t *this,
if (ret == -1)
goto err;
- if ((priv->feature_enabled & GF_QUOTA) && xattr_req)
+ if ((priv->feature_enabled & GF_QUOTA))
mq_req_xattr (this, loc, xattr_req, NULL);
wind:
STACK_WIND (frame, marker_lookup_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->lookup, loc, xattr_req);
+
+ dict_unref (xattr_req);
+
return 0;
err:
STACK_UNWIND_STRICT (lookup, frame, -1, ENOMEM, NULL, NULL, NULL, NULL);
+ if (xattr_req)
+ dict_unref (xattr_req);
+
return 0;
}
@@ -2780,8 +2790,6 @@ marker_build_ancestry_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
continue;
}
- mq_xattr_state (this, &loc, entry->dict, entry->d_stat);
-
inode_unref (parent);
parent = inode_ref (entry->inode);
loc_wipe (&loc);