summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/cluster/afr/src/afr-common.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index 5c4a649b9..424a69971 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -2557,11 +2557,7 @@ afr_flush (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
local->fd = fd_ref(fd);
call_count = local->call_count;
- /*
- * Ideally we should synchronize flush against completion of writing
- * the delayed changelog, but for now we just push it out first...
- */
- afr_delayed_changelog_wake_up(this, fd);
+ afr_delayed_changelog_wake_up (this, fd);
for (i = 0; i < priv->child_count; i++) {
if (local->child_up[i]) {
@@ -2739,6 +2735,8 @@ afr_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd,
local->fd = fd_ref (fd);
+ afr_delayed_changelog_wake_up (this, fd);
+
for (i = 0; i < priv->child_count; i++) {
if (local->child_up[i]) {
STACK_WIND_COOKIE (frame, afr_fsync_cbk,