From: Xiubo Li Date: Mon, 27 Nov 2023 07:55:42 +0000 (+0800) Subject: mds: set the loner to true for LOCK_EXCL_XSYN X-Git-Tag: v18.2.4~301^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7347f88bde0c641f182c99678acb39dad4c7ed04;p=ceph.git 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) --- diff --git a/src/mds/locks.c b/src/mds/locks.c index dbe3ab8eb00..f6ff8b9824a 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 },