summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunaid <junaid@gluster.com>2011-04-06 23:57:24 +0000
committerVijay Bellur <vijay@gluster.com>2011-04-07 06:28:31 -0700
commit50a0adf03e1401395b04c7bba3d5007658cae9e4 (patch)
tree043b8a3b05ad62c9223314903ebeb42addb27abe
parent35dea20e40958ebbf018354e040570e654eb6bfc (diff)
features/marker: Check if gsync is enabled in getxattr fop before performing gsync related operations.
Signed-off-by: Junaid <junaid@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> 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
-rw-r--r--xlators/features/marker/src/marker.c10
1 files 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);