summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-inode-read.c
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2011-08-19 15:56:49 +0530
committerVijay Bellur <vijay@gluster.com>2011-08-19 23:18:53 -0700
commitd9c6513289ca33204cdc110112ff8e45cbc8970a (patch)
treed68097996f3dd9b0882343be1c5d0b7bf6758315 /xlators/cluster/afr/src/afr-inode-read.c
parent5e89fda5180e66b1757bc620dfdb5701ce4d43f1 (diff)
cluster/afr: Update fresh_children in lookup if no other ops in progress
If write/truncate fails we should remove the child that failed the fop from the fresh children. The previous code assumes that the children that succeeded the fop are fresh children, which is wrong. Fixed that in this patch. Change-Id: I1e6e21e20faea00516a0fdd2e95f2d7e9cf9076d BUG: 3411 Reviewed-on: http://review.gluster.com/263 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-inode-read.c')
-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 7d7cc3d80c8..f8157482758 100644
--- a/xlators/cluster/afr/src/afr-inode-read.c
+++ b/xlators/cluster/afr/src/afr-inode-read.c
@@ -136,7 +136,7 @@ afr_access (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t mask)
goto out;
}
- local->fresh_children = afr_fresh_children_create (priv->child_count);
+ local->fresh_children = afr_children_create (priv->child_count);
if (!local->fresh_children) {
op_errno = ENOMEM;
goto out;
@@ -254,7 +254,7 @@ afr_stat (call_frame_t *frame, xlator_t *this, loc_t *loc)
goto out;
}
- local->fresh_children = afr_fresh_children_create (priv->child_count);
+ local->fresh_children = afr_children_create (priv->child_count);
if (!local->fresh_children) {
op_errno = ENOMEM;
goto out;
@@ -375,7 +375,7 @@ afr_fstat (call_frame_t *frame, xlator_t *this,
goto out;
}
- local->fresh_children = afr_fresh_children_create (priv->child_count);
+ local->fresh_children = afr_children_create (priv->child_count);
if (!local->fresh_children) {
op_errno = ENOMEM;
goto out;
@@ -495,7 +495,7 @@ afr_readlink (call_frame_t *frame, xlator_t *this,
goto out;
}
- local->fresh_children = afr_fresh_children_create (priv->child_count);
+ local->fresh_children = afr_children_create (priv->child_count);
if (!local->fresh_children) {
op_errno = ENOMEM;
goto out;
@@ -879,7 +879,7 @@ afr_getxattr (call_frame_t *frame, xlator_t *this,
}
}
- local->fresh_children = afr_fresh_children_create (priv->child_count);
+ local->fresh_children = afr_children_create (priv->child_count);
if (!local->fresh_children) {
op_errno = ENOMEM;
goto out;
@@ -1013,7 +1013,7 @@ afr_readv (call_frame_t *frame, xlator_t *this,
goto out;
}
- local->fresh_children = afr_fresh_children_create (priv->child_count);
+ local->fresh_children = afr_children_create (priv->child_count);
if (!local->fresh_children) {
op_errno = ENOMEM;
goto out;