client: update ctime for auth, xattr

This mirrors the kclient fix in d8672d64.  The client can have a newer
ctime due to auth or xattr excl caps.  This fixes cases where ctime goes
backwards due to the right sequence of local operations and replies
from the MDS.

Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
Sage Weil 2011-05-16 14:47:29 -07:00
parent 8e6b53fed1
commit a4bd854f86

View File

@ -402,7 +402,9 @@ void Client::update_inode_file_bits(Inode *in,
// be careful with size, mtime, atime
if (issued & (CEPH_CAP_FILE_EXCL|
CEPH_CAP_FILE_WR|
CEPH_CAP_FILE_BUFFER)) {
CEPH_CAP_FILE_BUFFER|
CEPH_CAP_AUTH_EXCL|
CEPH_CAP_XATTR_EXCL)) {
dout(30) << "Yay have enough caps to look at our times" << dendl;
if (ctime > in->ctime)
in->ctime = ctime;