12a457
From a2ee0b12f2296ef5148f7a67a4b4ce9ef25c7b0b Mon Sep 17 00:00:00 2001
12a457
From: Mohammed Rafi KC <rkavunga@redhat.com>
12a457
Date: Fri, 22 Apr 2016 12:07:31 +0530
12a457
Subject: [PATCH 101/104] tier/dht: check for rebalance completion for EIO error
12a457
12a457
When an ongoing rebalance completion check task been
12a457
triggered by dht, there is a possibility of a race
12a457
between afr setting subvol as non-readable and dht updates
12a457
the cached subvol. In this window a write can fail with EIO.
12a457
12a457
Back port of>
12a457
>Change-Id: I42638e6d4104c0dbe893d1bc73e1366188458c5d
12a457
>BUG: 1329503
12a457
>Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
12a457
>Reviewed-on: http://review.gluster.org/14049
12a457
>NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
12a457
>Smoke: Gluster Build System <jenkins@build.gluster.com>
12a457
>CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
12a457
>Reviewed-by: N Balachandran <nbalacha@redhat.com>
12a457
>Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
12a457
12a457
>(cherry picked from commit a9ccd0c8ea6989c72073028b296f73a6fcb6b896)
12a457
>Change-Id: Ifc741f05a9cfe5c1d9c03085312ebbf21b8b798b
12a457
>BUG: 1330428
12a457
>Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
12a457
>Reviewed-on: http://review.gluster.org/14070
12a457
>Smoke: Gluster Build System <jenkins@build.gluster.com>
12a457
>NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
12a457
>CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
12a457
>Reviewed-by: N Balachandran <nbalacha@redhat.com>
12a457
>Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
12a457
12a457
Change-Id: Iadbbd7920ee8fc982cad43a8c18ef7dab43e7c89
12a457
BUG: 1326248
12a457
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
12a457
Reviewed-on: https://code.engineering.redhat.com/gerrit/73260
12a457
Reviewed-by: Susant Palai <spalai@redhat.com>
12a457
Reviewed-by: Raghavendra Gowdappa <rgowdapp@redhat.com>
12a457
Tested-by: Raghavendra Gowdappa <rgowdapp@redhat.com>
12a457
---
12a457
 xlators/cluster/dht/src/dht-common.h |    4 +++-
12a457
 1 files changed, 3 insertions(+), 1 deletions(-)
12a457
12a457
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
12a457
index 431a6d5..369b7d4 100644
12a457
--- a/xlators/cluster/dht/src/dht-common.h
12a457
+++ b/xlators/cluster/dht/src/dht-common.h
12a457
@@ -617,7 +617,9 @@ typedef struct dht_fd_ctx {
12a457
                 }                                               \
12a457
         } while (0)
12a457
 
12a457
-#define dht_inode_missing(op_errno) (op_errno == ENOENT || op_errno == ESTALE)
12a457
+#define dht_inode_missing(op_errno) (op_errno == ENOENT || op_errno == ESTALE \
12a457
+                                     || op_errno == EIO) \
12a457
+/*Bad fix. Please revert the commit after fixing the bug 1329505*/
12a457
 
12a457
 #define check_is_dir(i,s,x) (IA_ISDIR(s->ia_type))
12a457
 
12a457
-- 
12a457
1.7.1
12a457