mirror of
https://github.com/ceph/ceph
synced 2024-12-25 21:03:31 +00:00
client: clarify setattr forced sync behavior
Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
527241699d
commit
ac0314436a
@ -5807,6 +5807,17 @@ int Client::_setattr(Inode *in, struct stat *attr, int mask, int uid, int gid,
|
||||
<< " != cap dirtier " << in->cap_dirtier_uid << ":"
|
||||
<< in->cap_dirtier_gid << ", forcing sync setattr"
|
||||
<< dendl;
|
||||
/*
|
||||
* This works because we implicitly flush the caps as part of the
|
||||
* request, so the cap update check will happen with the writeback
|
||||
* cap context, and then the setattr check will happen with the
|
||||
* caller's context.
|
||||
*
|
||||
* In reality this pattern is likely pretty rare (different users
|
||||
* setattr'ing the same file). If that turns out not to be the
|
||||
* case later, we can build a more complex pipelined cap writeback
|
||||
* infrastructure...
|
||||
*/
|
||||
if (!mask)
|
||||
mask |= CEPH_SETATTR_CTIME;
|
||||
goto force_request;
|
||||
|
Loading…
Reference in New Issue
Block a user