From f97897c394a7f3e9d5e870ba9814ff2ebfc4cc01 Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Mon, 14 Nov 2011 15:53:27 +0530 Subject: Cluster/stripe setattr: Wind only to first_child for special files Change-Id: Ib055578477461a24562d5da139809cf0965b931e BUG: 3807 Reviewed-on: http://review.gluster.com/724 Reviewed-by: Amar Tumballi Tested-by: Gluster Build System --- xlators/cluster/stripe/src/stripe.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'xlators') diff --git a/xlators/cluster/stripe/src/stripe.c b/xlators/cluster/stripe/src/stripe.c index 1bea7a733..4faa0a828 100644 --- a/xlators/cluster/stripe/src/stripe.c +++ b/xlators/cluster/stripe/src/stripe.c @@ -862,8 +862,16 @@ stripe_setattr (call_frame_t *frame, xlator_t *this, loc_t *loc, } local->op_ret = -1; frame->local = local; - local->call_count = priv->child_count; + if (!IA_ISDIR (loc->inode->ia_type) && + !IA_ISREG (loc->inode->ia_type)) { + local->call_count = 1; + STACK_WIND (frame, stripe_setattr_cbk, FIRST_CHILD (this), + FIRST_CHILD (this)->fops->setattr, + loc, stbuf, valid); + return 0; + } + local->call_count = priv->child_count; while (trav) { STACK_WIND (frame, stripe_setattr_cbk, trav->xlator, trav->xlator->fops->setattr, -- cgit