diff options
author | Susant Palai <spalai@redhat.com> | 2015-12-02 04:59:55 -0500 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2016-01-24 18:27:52 -0800 |
commit | f3426ccc95133f8b5c946f98867090c636305d6e (patch) | |
tree | 7b3c0c5663b6d959e1d51beb1a148a1abef49a5e | |
parent | b313b72ab0bf1fbc92b8b201ea4154ce5fd73c88 (diff) |
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 <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>
Signed-off-by: Susant Palai <spalai@redhat.com>
Reviewed-on: http://review.gluster.org/13184
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 7 |
1 files changed, 7 insertions, 0 deletions
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); } |