diff options
author | Anand Avati <avati@redhat.com> | 2014-04-01 17:28:55 -0700 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-04-17 11:41:48 -0700 |
commit | 02ac5fa4b5ed4c1cb531724c85ff10c83f221541 (patch) | |
tree | de33b3bef33e0008c30dee6b4c6bc51eb61900bb /xlators/cluster/dht/src/dht-inode-write.c | |
parent | e55f3fe25a4fd2cc9021fad97faedc5e94aa4e7c (diff) |
cluster/dht: force set dir inode ctx cached time in setattr()
In setattr, the inode times may have been explicitly set "back
in time". In such cases, if the inode ctx times are not force
set, then they continue to be higher and continue serving the
higher/older value in future calls to dht_inode_ctx_time_update()
Change-Id: I9cbfa7cf7c4069b0106d1f462de08c5d59bc91b5
BUG: 1083324
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/7378
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-inode-write.c')
-rw-r--r-- | xlators/cluster/dht/src/dht-inode-write.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-inode-write.c b/xlators/cluster/dht/src/dht-inode-write.c index 363bff3bfa8..576f007e513 100644 --- a/xlators/cluster/dht/src/dht-inode-write.c +++ b/xlators/cluster/dht/src/dht-inode-write.c @@ -862,9 +862,13 @@ unlock: UNLOCK (&frame->lock); this_call_cnt = dht_frame_return (frame); - if (is_last_call (this_call_cnt)) + if (is_last_call (this_call_cnt)) { + if (local->op_ret == 0) + dht_inode_ctx_time_set (local->loc.inode, this, + &local->stbuf); DHT_STACK_UNWIND (setattr, frame, local->op_ret, local->op_errno, &local->prebuf, &local->stbuf, xdata); + } return 0; } |