Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Xiubo Li and committed by
Ilya Dryomov
8266c4d7 300e42a2

+7 -1
+7 -1
fs/ceph/inode.c
··· 2275 2275 * 2276 2276 * This cost much when doing the Locker state transition and 2277 2277 * 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. 2278 2284 */ 2279 2285 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))) 2281 2287 return USE_AUTH_MDS; 2282 2288 else 2283 2289 return USE_ANY_MDS;