diff options
author | Xiubo Li <xiubli@redhat.com> | 2022-04-21 11:26:40 +0800 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2022-05-25 20:45:14 +0200 |
commit | 5eed80fba65cd707075892450bc5d6bd464862a0 (patch) | |
tree | d32223faa79185ffbee71c6420bcdc0abd996746 /fs/ceph/super.h | |
parent | f7a2d0688a3b2bb4769402b4c962f54f7b0fc23c (diff) |
ceph: try to choose the auth MDS if possible for getattr
If any 'x' caps is issued we can just choose the auth MDS instead
of the random replica MDSes. Because only when the Locker is in
LOCK_EXEC state will the loner client could get the 'x' caps. And
if we send the getattr requests to any replica MDS it must auth pin
and tries to rdlock from the auth MDS, and then the auth MDS need
to do the Locker state transition to LOCK_SYNC. And after that the
lock state will change back.
This cost much when doing the Locker state transition and usually
will need to revoke caps from clients.
URL: https://tracker.ceph.com/issues/55240
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r-- | fs/ceph/super.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index 20ceab74e871..d749c96070f6 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h @@ -1022,6 +1022,7 @@ static inline void ceph_queue_flush_snaps(struct inode *inode) ceph_queue_inode_work(inode, CEPH_I_WORK_FLUSH_SNAPS); } +extern int ceph_try_to_choose_auth_mds(struct inode *inode, int mask); extern int __ceph_do_getattr(struct inode *inode, struct page *locked_page, int mask, bool force); static inline int ceph_do_getattr(struct inode *inode, int mask, bool force) |