Skip to content

Commit 8266c4d

Browse files
lxbszidryomov
authored andcommitted
ceph: choose auth MDS for getxattr with the Xs caps
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 replica MDSes when the values changed and the replica MDS will return the old values. Though we will fix it in MDS code, but this still makes sense for old ceph. Link: https://tracker.ceph.com/issues/55331 Signed-off-by: Xiubo Li <xiubli@redhat.com> Reviewed-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
1 parent 300e42a commit 8266c4d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

fs/ceph/inode.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2275,9 +2275,15 @@ int ceph_try_to_choose_auth_mds(struct inode *inode, int mask)
22752275
*
22762276
* This cost much when doing the Locker state transition and
22772277
* usually will need to revoke caps from clients.
2278+
*
2279+
* And for the 'Xs' caps for getxattr we will also choose the
2280+
* auth MDS, because the MDS side code is buggy due to setxattr
2281+
* won't notify the replica MDSes when the values changed and
2282+
* the replica MDS will return the old values. Though we will
2283+
* fix it in MDS code, but this still makes sense for old ceph.
22782284
*/
22792285
if (((mask & CEPH_CAP_ANY_SHARED) && (issued & CEPH_CAP_ANY_EXCL))
2280-
|| (mask & CEPH_STAT_RSTAT))
2286+
|| (mask & (CEPH_STAT_RSTAT | CEPH_STAT_CAP_XATTR)))
22812287
return USE_AUTH_MDS;
22822288
else
22832289
return USE_ANY_MDS;

0 commit comments

Comments
 (0)