Whamcloud - gitweb
LU-9033 llite: don't zero timestamps internally 84/24984/2
authorNiu Yawei <yawei.niu@intel.com>
Thu, 19 Jan 2017 02:58:51 +0000 (21:58 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 31 Jan 2017 04:11:02 +0000 (04:11 +0000)
commit8718346e06cf2e17447dd3e3dc4e45b66d945aaf
tree6d525a4f33454054c0af692f2ac8ef47f7e0aaa6
parent0a9f9ab41b4fd2a697439a195aa3ee7cf0705e64
LU-9033 llite: don't zero timestamps internally

In ll_md_blocking_ast(), we zero all timestamps to avoid these
'leftovers' interfering the new timestamps from MDS, especially
when the timestamps are set back by other clients. It's not
quite right to change timestamps in this way, because:

1. The pending lock can be matched by getattr, so these zero
   timestamps can be fetched by application in a small race window.

2. It doesn't make sense to zero the mtime and ctime, because we
   always use the newest ctime and mtime from MDS when do attributes
   merge, they won't interfere new timestamps set by other clients.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Ieb9577abe4938bc47dc0577454a4a1bbf4796876
Reviewed-on: https://review.whamcloud.com/24984
Tested-by: Jenkins
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/llite/file.c
lustre/llite/llite_internal.h
lustre/llite/namei.c