Whamcloud - gitweb
LU-5951 clio: update timestamps after buiding rpc 65/12865/4
authorNiu Yawei <yawei.niu@intel.com>
Mon, 1 Dec 2014 06:05:55 +0000 (01:05 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 4 Dec 2014 13:35:13 +0000 (13:35 +0000)
commit665ad328b368f1cbd8646690999b609d7b0feaf9
tree8f6bee3dea48fc3d12143f5994e300b2d6b53042
parent227ed3d87354cc1122343ef4f4e931960d1fe276
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().

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I16216038ea2bd064ef7f33857a1d4aba167ac5fb
Reviewed-on: http://review.whamcloud.com/12865
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/ofd/ofd_objects.c
lustre/osc/osc_request.c