From f3426ccc95133f8b5c946f98867090c636305d6e Mon Sep 17 00:00:00 2001 From: Susant Palai Date: Wed, 2 Dec 2015 04:59:55 -0500 Subject: cluster/dht: Handle failure in getxattr Problem: Currently even if we have received xattrs from any one of the subvolume, we unwind with error in case the last subvol (which unwinds) received a negative response. To handle the case check if any of the subvolume has received a response and pass it down. BUG: 1296108 Change-Id: I5279442fabd500934d04509d83ae87fdd69388e2 Signed-off-by: Susant Palai Reviewed-on: http://review.gluster.org/12845 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Raghavendra G Signed-off-by: Susant Palai Reviewed-on: http://review.gluster.org/13184 Reviewed-by: Pranith Kumar Karampuri Tested-by: Pranith Kumar Karampuri Smoke: Gluster Build System CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System --- xlators/cluster/dht/src/dht-common.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'xlators/cluster/dht/src') diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 6e3320f9931..d478b058b91 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -2994,6 +2994,13 @@ unlock: this_call_cnt = dht_frame_return (frame); out: if (is_last_call (this_call_cnt)) { + + /* If we have a valid xattr received from any one of the + * subvolume, let's return it */ + if (local->xattr) { + local->op_ret = 0; + } + DHT_STACK_UNWIND (getxattr, frame, local->op_ret, op_errno, local->xattr, NULL); } -- cgit