]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: choose auth MDS for getxattr with the Xs caps 46800/head
authorXiubo Li <xiubli@redhat.com>
Fri, 27 May 2022 05:11:44 +0000 (13:11 +0800)
committerXiubo Li <xiubli@redhat.com>
Wed, 22 Jun 2022 05:26:02 +0000 (13:26 +0800)
commitd3333009a1fe91ccd7b092a3cbe676eafe0b5106
tree722af747eba7938321a2d982be3fd8cec83265ba
parent0e0d3425a1484a75b51576288973474c3b766151
client: choose auth MDS for getxattr with the Xs caps

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.

And for the 'Xs' caps for getxattr we will also choose the auth MDS,
because the MDS side code is buggy due to setxattr won't notify the
increased xattr_version to replicated MDSes when the values changed
and the replica MDS will return the old xattr_version value. The
client will just drop the xattr values since it sees the xattr_version
doesn't change.

Fixes: https://tracker.ceph.com/issues/55778
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 241608df24bd1d53f7cafada53f14ccf74c3e946)
src/client/Client.cc
src/client/MetaRequest.h