From 20515bce097f2bc0990f770d97593083c0ad1091 Mon Sep 17 00:00:00 2001 From: Xiubo Li Date: Mon, 27 Nov 2023 15:55:42 +0800 Subject: [PATCH] mds: set the loner to true for LOCK_EXCL_XSYN For filelock when in LOCK_EXCL_XSYN state the non-loner clients should be issued empty caps, but since the loner of this state is set to false and it could make the Locker to issue the Fcb caps to them, which is incorrect. This fix will just set the loner to true. Fixes: https://tracker.ceph.com/issues/63646 Signed-off-by: Xiubo Li (cherry picked from commit 1766a354278706eea560cb989796cc97dbef8b4b) --- src/mds/locks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mds/locks.c b/src/mds/locks.c index dbe3ab8eb00ab..f6ff8b9824a18 100644 --- a/src/mds/locks.c +++ b/src/mds/locks.c @@ -117,7 +117,7 @@ const struct sm_state_t filelock[LOCK_MAX] = { [LOCK_XSYN_EXCL] = { LOCK_EXCL, true, LOCK_LOCK, AUTH, 0, XCL, 0, 0, 0, 0, 0,CEPH_CAP_GCACHE|CEPH_CAP_GBUFFER,0,0 }, [LOCK_XSYN] = { 0, true, LOCK_LOCK, AUTH, AUTH,AUTH,XCL, 0, 0, 0, 0,CEPH_CAP_GCACHE|CEPH_CAP_GBUFFER,0,0 }, - [LOCK_EXCL_XSYN] = { LOCK_XSYN, false, LOCK_LOCK, 0, 0, XCL, 0, 0, 0, 0, 0,CEPH_CAP_GCACHE|CEPH_CAP_GBUFFER,0,0 }, + [LOCK_EXCL_XSYN] = { LOCK_XSYN, true, LOCK_LOCK, 0, 0, XCL, 0, 0, 0, 0, 0,CEPH_CAP_GCACHE|CEPH_CAP_GBUFFER,0,0 }, [LOCK_PRE_SCAN] = { LOCK_SCAN, false, LOCK_LOCK, 0, 0, 0, 0, 0, 0, 0, 0,0,0,0 }, [LOCK_SCAN] = { LOCK_LOCK, false, LOCK_LOCK, 0, 0, 0, 0, 0, 0, 0, 0,0,0,0 }, -- 2.39.5