From 692ccdbd4d11311a1967d62227666d2c473ea233 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. Change-Id: Ia12a1f9671a6764f7550e6dc223324b1039fcc51 BUG: 1287539 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 --- 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 9d661441122..39da4323d8e 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -3001,6 +3001,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