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 <spalai@redhat.com>
Reviewed-on: http://review.gluster.org/12845
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
This commit is contained in:
Susant Palai 2015-12-02 04:59:55 -05:00 committed by Raghavendra G
parent b5de382afa
commit 692ccdbd4d

View File

@ -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);
}