From 50a0adf03e1401395b04c7bba3d5007658cae9e4 Mon Sep 17 00:00:00 2001 From: Junaid Date: Wed, 6 Apr 2011 23:57:24 +0000 Subject: features/marker: Check if gsync is enabled in getxattr fop before performing gsync related operations. Signed-off-by: Junaid Signed-off-by: Vijay Bellur BUG: 2681 (marker returns dummy data for volume-mark attribute if xtime is switched off) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2681 --- xlators/features/marker/src/marker.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c index 4062b8d0b..c84469b15 100644 --- a/xlators/features/marker/src/marker.c +++ b/xlators/features/marker/src/marker.c @@ -267,12 +267,18 @@ int32_t marker_getxattr (call_frame_t *frame, xlator_t *this, loc_t *loc, const char *name) { - gf_boolean_t ret; + gf_boolean_t ret = _gf_false; + marker_conf_t *priv = NULL; + + priv = this->private; + + if (priv == NULL || (priv->feature_enabled & GF_GSYNC) == 0) + goto wind; gf_log (this->name, GF_LOG_DEBUG, "USER:PID = %d", frame->root->pid); ret = call_from_special_client (frame, this, name); - +wind: if (ret == _gf_false) STACK_WIND (frame, marker_getxattr_cbk, FIRST_CHILD(this), FIRST_CHILD(this)->fops->getxattr, loc, name); -- cgit