From a9ccd0c8ea6989c72073028b296f73a6fcb6b896 Mon Sep 17 00:00:00 2001 From: Mohammed Rafi KC Date: Fri, 22 Apr 2016 12:07:31 +0530 Subject: tier/dht: check for rebalance completion for EIO error When an ongoing rebalance completion check task been triggered by dht, there is a possibility of a race between afr setting subvol as non-readable and dht updates the cached subvol. In this window a write can fail with EIO. Change-Id: I42638e6d4104c0dbe893d1bc73e1366188458c5d BUG: 1329503 Signed-off-by: Mohammed Rafi KC Reviewed-on: http://review.gluster.org/14049 NetBSD-regression: NetBSD Build System Smoke: Gluster Build System CentOS-regression: Gluster Build System Reviewed-by: N Balachandran Reviewed-by: Jeff Darcy --- xlators/cluster/dht/src/dht-common.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h index ad868939523..1dfc5cddaea 100644 --- a/xlators/cluster/dht/src/dht-common.h +++ b/xlators/cluster/dht/src/dht-common.h @@ -613,7 +613,9 @@ typedef struct dht_fd_ctx { } \ } while (0) -#define dht_inode_missing(op_errno) (op_errno == ENOENT || op_errno == ESTALE) +#define dht_inode_missing(op_errno) (op_errno == ENOENT || op_errno == ESTALE \ + || op_errno == EIO) \ +/*Bad fix. Please revert the commit after fixing the bug 1329505*/ #define check_is_dir(i,s,x) (IA_ISDIR(s->ia_type)) -- cgit