mirror of
https://github.com/ceph/ceph
synced 2025-02-24 11:37:37 +00:00
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:
parent
8e6b53fed1
commit
a4bd854f86
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user