summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2010-09-18 03:20:58 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-18 02:14:23 -0700
commitdc648b30d2b892ef9413a32893070d1abf69f3df (patch)
tree19857437e4ea304eacb170ad6588d003c1b5e3ce /xlators/cluster/afr/src
parent1cc83c61c06b8271e856466530513dd63c3e8681 (diff)
cluster/replicate: stack_wind into read_child only if it is up.
Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1637 (replicate should wind reads into read-child only if it is up) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1637
Diffstat (limited to 'xlators/cluster/afr/src')
-rw-r--r--xlators/cluster/afr/src/afr-inode-read.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/xlators/cluster/afr/src/afr-inode-read.c b/xlators/cluster/afr/src/afr-inode-read.c
index 74f3d9ddb0e..8d6e12a93dd 100644
--- a/xlators/cluster/afr/src/afr-inode-read.c
+++ b/xlators/cluster/afr/src/afr-inode-read.c
@@ -138,7 +138,7 @@ afr_access (call_frame_t *frame, xlator_t *this,
read_child = afr_read_child (this, loc->inode);
- if (read_child >= 0) {
+ if ((read_child >= 0) && (priv->child_up[read_child])) {
call_child = read_child;
local->cont.access.last_tried = -1;
@@ -260,7 +260,7 @@ afr_stat (call_frame_t *frame, xlator_t *this,
read_child = afr_read_child (this, loc->inode);
- if (read_child >= 0) {
+ if ((read_child >= 0) && (priv->child_up[read_child])) {
call_child = read_child;
local->cont.stat.last_tried = -1;
@@ -387,7 +387,7 @@ afr_fstat (call_frame_t *frame, xlator_t *this,
read_child = afr_read_child (this, fd->inode);
- if (read_child >= 0) {
+ if ((read_child >= 0) && (priv->child_up[read_child])) {
call_child = read_child;
local->cont.fstat.last_tried = -1;
@@ -509,7 +509,7 @@ afr_readlink (call_frame_t *frame, xlator_t *this,
read_child = afr_read_child (this, loc->inode);
- if (read_child >= 0) {
+ if ((read_child >= 0) && (priv->child_up[read_child])) {
call_child = read_child;
local->cont.readlink.last_tried = -1;
@@ -695,7 +695,7 @@ afr_getxattr (call_frame_t *frame, xlator_t *this,
read_child = afr_read_child (this, loc->inode);
- if (read_child >= 0) {
+ if ((read_child >= 0) && (priv->child_up[read_child])) {
call_child = read_child;
local->cont.getxattr.last_tried = -1;
@@ -842,7 +842,7 @@ afr_readv (call_frame_t *frame, xlator_t *this,
read_child = afr_read_child (this, fd->inode);
- if (read_child >= 0) {
+ if ((read_child >= 0) && (priv->child_up[read_child])) {
call_child = read_child;
/*