diff options
author | N Balachandran <nbalacha@redhat.com> | 2017-08-08 22:33:24 +0530 |
---|---|---|
committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2017-08-12 13:37:31 +0000 |
commit | 9e2e26726d8ebf9c702e1ba81e0b3b4e456a7fc2 (patch) | |
tree | f994f6585277856203d0cd34f12ebb4209308620 /xlators/cluster/dht/src/dht-common.c | |
parent | d66af9ac76f84faa33ecb2eb390656f5637e6fee (diff) |
cluster/dht: EBADF handling for fremovexattr and fsetxattr
Add EBADF handling for dht_fremovexattr and dht_fsetxattr.
> BUG: 1476665
> Signed-off-by: N Balachandran <nbalacha@redhat.com>
> Reviewed-on: https://review.gluster.org/17999
> Smoke: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
(cherry picked from commit 747a08d34e2a1e94d7fce68a3577370288bb1955)
Change-Id: Ide0d5812dae79655d2565157e5baabcd753b4309
BUG: 1479303
Signed-off-by: N Balachandran <nbalacha@redhat.com>
Reviewed-on: https://review.gluster.org/18012
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.c')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index d328b78cbe1..9643caa0e17 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -3815,6 +3815,14 @@ dht_file_setxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, local->op_errno = op_errno; + if ((local->fop == GF_FOP_FSETXATTR) && + op_ret == -1 && (op_errno == EBADF) && !(local->fd_checked)) { + ret = dht_check_and_open_fd_on_subvol (this, frame); + if (ret) + goto out; + return 0; + } + if ((op_ret == -1) && !dht_inode_missing (op_errno)) { gf_msg_debug (this->name, op_errno, "subvolume %s returned -1.", @@ -4388,6 +4396,14 @@ dht_file_removexattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, local->op_errno = op_errno; + if ((local->fop == GF_FOP_FREMOVEXATTR) && + (op_ret == -1) && (op_errno == EBADF) && !(local->fd_checked)) { + ret = dht_check_and_open_fd_on_subvol (this, frame); + if (ret) + goto out; + return 0; + } + if ((op_ret == -1) && !dht_inode_missing (op_errno)) { gf_msg_debug (this->name, op_errno, "subvolume %s returned -1", |