]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: set the loner to true for LOCK_EXCL_XSYN 54912/head
authorXiubo Li <xiubli@redhat.com>
Mon, 27 Nov 2023 07:55:42 +0000 (15:55 +0800)
committerXiubo Li <xiubli@redhat.com>
Fri, 15 Dec 2023 04:04:18 +0000 (12:04 +0800)
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 <xiubli@redhat.com>
(cherry picked from commit 1766a354278706eea560cb989796cc97dbef8b4b)

src/mds/locks.c

index dbe3ab8eb00abf9843c8038ab8f66494c621901d..f6ff8b9824a187143d7c50120fd6d578eeb7807e 100644 (file)
@@ -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 },