diff options
Diffstat (limited to 'xlators/cluster/afr/src/afr-inode-write.c')
| -rw-r--r-- | xlators/cluster/afr/src/afr-inode-write.c | 16 | 
1 files changed, 14 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-inode-write.c b/xlators/cluster/afr/src/afr-inode-write.c index 084a78ecf47..4fdf7b5bd0c 100644 --- a/xlators/cluster/afr/src/afr-inode-write.c +++ b/xlators/cluster/afr/src/afr-inode-write.c @@ -187,7 +187,9 @@ __afr_inode_write_cbk (call_frame_t *frame, void *cookie, xlator_t *this,          afr_local_t *local = NULL;          int child_index = (long) cookie;          int call_count = -1; +        afr_private_t *priv = NULL; +        priv = this->private;          local = frame->local;          LOCK (&frame->lock); @@ -203,8 +205,13 @@ __afr_inode_write_cbk (call_frame_t *frame, void *cookie, xlator_t *this,          if (call_count == 0) {  		__afr_inode_write_finalize (frame, this); -		if (afr_txn_nothing_failed (frame, this)) -			local->transaction.unwind (frame, this); +		if (afr_txn_nothing_failed (frame, this)) { +                        /*if it did pre-op, it will do post-op changing ctime*/ +                        if (priv->consistent_metadata && +                            afr_needs_changelog_update (local)) +                                afr_zero_fill_stat (local); +                        local->transaction.unwind (frame, this); +                }                  local->transaction.resume (frame, this);          } @@ -235,8 +242,13 @@ void  afr_writev_unwind (call_frame_t *frame, xlator_t *this)  {          afr_local_t *   local = NULL; +        afr_private_t *priv = this->private; +          local = frame->local; +       if (priv->consistent_metadata) +               afr_zero_fill_stat (local); +          AFR_STACK_UNWIND (writev, frame,                            local->op_ret, local->op_errno,                            &local->cont.inode_wfop.prebuf,  | 
