diff options
author | Vikas Gorur <vikas@zresearch.com> | 2009-02-26 17:13:25 +0530 |
---|---|---|
committer | Anand V. Avati <avati@amp.gluster.com> | 2009-02-26 18:03:12 +0530 |
commit | 523d23b94c21cf5cfdfd087409371d9d2dcf25a4 (patch) | |
tree | 25aa571ee25aa52c4ec3b9558a770e8742e5ec3a /xlators/cluster/afr | |
parent | b5377787903109dd5aea408e7b3a8e772b2be4f5 (diff) |
Unset fd_ctx in afr_flush if it is set
If fd_ctx is set, it means pending array needs to be decremented.
However, flush might be called many times and it used to lead
to multiple decrements. Fix is to unset fd_ctx on the first flush
received
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'xlators/cluster/afr')
-rw-r--r-- | xlators/cluster/afr/src/afr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c index e4c1a847985..1be016a394b 100644 --- a/xlators/cluster/afr/src/afr.c +++ b/xlators/cluster/afr/src/afr.c @@ -833,6 +833,8 @@ afr_flush (call_frame_t *frame, xlator_t *this, fd_t *fd) frame->local = local; if (__is_fd_ctx_set (this, fd)) { + fd_ctx_del (fd, this, NULL); + local->op = GF_FOP_FLUSH; local->transaction.fop = afr_flush_wind; local->transaction.done = afr_flush_done; |