Whamcloud - gitweb
LU-5951 clio: update timestamps after buiding rpc 61/13261/2
authorNiu Yawei <yawei.niu@intel.com>
Wed, 7 Jan 2015 02:17:56 +0000 (18:17 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 27 Jan 2015 02:41:58 +0000 (02:41 +0000)
commit7b70c1598a9b484cfe7f50c584caaca5ab64f0ba
tree0192d1594976922a33399bdae26b632c46863b0d
parent54a78152b70b54ec574774eef97dcf4c27b06d5b
LU-5951 clio: update timestamps after buiding rpc

The mtime/atime/ctime in the write RPC has to be updated after
the RPC is built (where xid is generated), otherwise, it could
race with the setattr and updating wrong timestamps on OST side.

Seems this regression was introduced when landing clio code.

Use ofd_write_lock() to protect fmd lookup/udpate in
ofd_punch_object(), otherwise, it could race with ofd_attr_set()
and ofd_commitrw().

This patch is back-ported from the following one:
Lustre-commit: 665ad328b368f1cbd8646690999b609d7b0feaf9
Lustre-change: http://review.whamcloud.com/12865

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Icb4c364752e72b4dece1496c0888797487ca239d
Reviewed-on: http://review.whamcloud.com/13261
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/ofd/ofd_objects.c
lustre/osc/osc_request.c