summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-open.c
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2010-09-29 01:11:07 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-29 01:43:34 -0700
commit95d45c7479db322028ab186f4f565c30cbdfba69 (patch)
treebb38829c0885aacfebf03fd6d49e5d2240682855 /xlators/cluster/afr/src/afr-open.c
parent34a635c43fa4e33df29be2141348b6c360fcacc9 (diff)
replicate: clear pre_op_done/piggyback values after open fd self-heal
Signed-off-by: Anand V. Avati <avati@amp.gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1235 (Bug for all pump/migrate commits) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1235
Diffstat (limited to 'xlators/cluster/afr/src/afr-open.c')
-rw-r--r--xlators/cluster/afr/src/afr-open.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-open.c b/xlators/cluster/afr/src/afr-open.c
index d943213b277..1360dfa89ae 100644
--- a/xlators/cluster/afr/src/afr-open.c
+++ b/xlators/cluster/afr/src/afr-open.c
@@ -314,8 +314,17 @@ afr_openfd_sh_unwind (call_frame_t *frame, xlator_t *this)
fd_ctx = (afr_fd_ctx_t *)(long) ctx;
- call_count = __unopened_count (priv->child_count, fd_ctx->opened_on,
- local->child_up);
+ LOCK (&local->fd->lock);
+ {
+ call_count = __unopened_count (priv->child_count,
+ fd_ctx->opened_on,
+ local->child_up);
+ for (i = 0; i < priv->child_count; i++) {
+ fd_ctx->pre_op_done[i] = 0;
+ fd_ctx->pre_op_piggyback[i] = 0;
+ }
+ }
+ UNLOCK (&local->fd->lock);
if (call_count == 0) {
abandon = 1;