diff options
author | Mohit Agrawal <moagrawal@redhat.com> | 2019-10-14 15:42:31 +0530 |
---|---|---|
committer | Mohit Agrawal <moagrawal@redhat.com> | 2019-10-15 15:26:21 +0530 |
commit | 9314a9fbf487614c736cf6c4c1b93078d37bb9df (patch) | |
tree | 3d0dec7274a6e943be47fe337dacc45a03a6a468 /xlators/cluster/dht/src/dht-common.h | |
parent | e3c3a3bc8805930b11e890baa99fc6e752e733f5 (diff) |
dht: Rebalance causing IO Error - File descriptor in bad state
Problem : When a file is migrated, dht attempts to re-open all open
fds on the new cached subvol. Earlier, if dht had not opened the fd,
the client xlator would be unable to find the remote fd and would
fall back to using an anon fd for the fop. That behavior changed with
https://review.gluster.org/#/c/glusterfs/+/15804, causing fops to fail
with EBADFD if the fd was not available on the cached subvol.
The client xlator returns EBADFD if the remote fd is not found but
dht only checks for EBADF before re-opening fds on the new cached subvol.
Solution: Handle EBADFD at dht code path to avoid the issue
Change-Id: I43c51995cdd48d05b12e4b2889c8dbe2bb2a72d8
Fixes: bz#1758579
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.h')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h index e126b3574af..3c992297f0f 100644 --- a/xlators/cluster/dht/src/dht-common.h +++ b/xlators/cluster/dht/src/dht-common.h @@ -1236,6 +1236,22 @@ dht_newfile_cbk(call_frame_t *frame, void *cookie, xlator_t *this, int op_ret, struct iatt *preparent, struct iatt *postparent, dict_t *xdata); int +dht_finodelk_cbk(call_frame_t *frame, void *cookie, xlator_t *this, + int32_t op_ret, int32_t op_errno, dict_t *xdata); + +int +dht_getxattr_cbk(call_frame_t *frame, void *cookie, xlator_t *this, int op_ret, + int op_errno, dict_t *xattr, dict_t *xdata); + +int +dht_common_xattrop_cbk(call_frame_t *frame, void *cookie, xlator_t *this, + int32_t op_ret, int32_t op_errno, dict_t *dict, + dict_t *xdata); +int +dht_fxattrop_cbk(call_frame_t *frame, void *cookie, xlator_t *this, + int32_t op_ret, int32_t op_errno, dict_t *dict, dict_t *xdata); + +int gf_defrag_status_get(dht_conf_t *conf, dict_t *dict); void @@ -1531,4 +1547,7 @@ int dht_pt_rename(call_frame_t *frame, xlator_t *this, loc_t *oldloc, loc_t *newloc, dict_t *xdata); +int32_t +dht_check_remote_fd_failed_error(dht_local_t *local, int op_ret, int op_errno); + #endif /* _DHT_H */ |