|
Luís Henriques |
97c6af |
From: Xiubo Li <xiubli@redhat.com>
|
|
Luís Henriques |
97c6af |
Date: Fri, 27 May 2022 12:39:17 +0800
|
|
Luís Henriques |
97c6af |
Subject: ceph: choose auth MDS for getxattr with the Xs caps
|
|
Luís Henriques |
97c6af |
Git-commit: 8266c4d7a7469c3fd45ee2b4ebc01aac311c6c48
|
|
Luís Henriques |
97c6af |
Patch-mainline: v6.0-rc1
|
|
Luís Henriques |
97c6af |
References: jsc#SES-1880
|
|
Luís Henriques |
97c6af |
|
|
Luís Henriques |
97c6af |
And for the 'Xs' caps for getxattr we will also choose the auth MDS,
|
|
Luís Henriques |
97c6af |
because the MDS side code is buggy due to setxattr won't notify the
|
|
Luís Henriques |
97c6af |
replica MDSes when the values changed and the replica MDS will return
|
|
Luís Henriques |
97c6af |
the old values. Though we will fix it in MDS code, but this still
|
|
Luís Henriques |
97c6af |
makes sense for old ceph.
|
|
Luís Henriques |
97c6af |
|
|
Luís Henriques |
97c6af |
Link: https://tracker.ceph.com/issues/55331
|
|
Luís Henriques |
97c6af |
Signed-off-by: Xiubo Li <xiubli@redhat.com>
|
|
Luís Henriques |
97c6af |
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
|
|
Luís Henriques |
97c6af |
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
|
|
Luís Henriques |
97c6af |
Acked-by: Luis Henriques <lhenriques@suse.com>
|
|
Luís Henriques |
97c6af |
---
|
|
Luís Henriques |
97c6af |
fs/ceph/inode.c | 8 +++++++-
|
|
Luís Henriques |
97c6af |
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
Luís Henriques |
97c6af |
|
|
Luís Henriques |
97c6af |
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
|
|
Luís Henriques |
97c6af |
index 56c53ab3618e..1834d6529f25 100644
|
|
Luís Henriques |
97c6af |
--- a/fs/ceph/inode.c
|
|
Luís Henriques |
97c6af |
+++ b/fs/ceph/inode.c
|
|
Luís Henriques |
97c6af |
@@ -2275,9 +2275,15 @@ int ceph_try_to_choose_auth_mds(struct inode *inode, int mask)
|
|
Luís Henriques |
97c6af |
*
|
|
Luís Henriques |
97c6af |
* This cost much when doing the Locker state transition and
|
|
Luís Henriques |
97c6af |
* usually will need to revoke caps from clients.
|
|
Luís Henriques |
97c6af |
+ *
|
|
Luís Henriques |
97c6af |
+ * And for the 'Xs' caps for getxattr we will also choose the
|
|
Luís Henriques |
97c6af |
+ * auth MDS, because the MDS side code is buggy due to setxattr
|
|
Luís Henriques |
97c6af |
+ * won't notify the replica MDSes when the values changed and
|
|
Luís Henriques |
97c6af |
+ * the replica MDS will return the old values. Though we will
|
|
Luís Henriques |
97c6af |
+ * fix it in MDS code, but this still makes sense for old ceph.
|
|
Luís Henriques |
97c6af |
*/
|
|
Luís Henriques |
97c6af |
if (((mask & CEPH_CAP_ANY_SHARED) && (issued & CEPH_CAP_ANY_EXCL))
|
|
Luís Henriques |
97c6af |
- || (mask & CEPH_STAT_RSTAT))
|
|
Luís Henriques |
97c6af |
+ || (mask & (CEPH_STAT_RSTAT | CEPH_STAT_CAP_XATTR)))
|
|
Luís Henriques |
97c6af |
return USE_AUTH_MDS;
|
|
Luís Henriques |
97c6af |
else
|
|
Luís Henriques |
97c6af |
return USE_ANY_MDS;
|
|
Luís Henriques |
97c6af |
|