]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix lock->sync rdlock rule
authorSage Weil <sage@newdream.net>
Mon, 3 May 2010 21:00:28 +0000 (14:00 -0700)
committerSage Weil <sage@newdream.net>
Mon, 3 May 2010 21:02:29 +0000 (14:02 -0700)
Observed symptom was touch foo on one node, and missing from ls on another
node.

Since auth rdlock isn't allowed for LOCk, it clearly shouldn't be for
LOCK->SYNC while e.g. wrlock modifications are still being flushed to the
journal and aren't yet applied.

src/mds/locks.c

index 3ffdf75884972e2cef5589e2dd39150db1fd5c0d..ed6271005109a49d15198379bb337876d5623dc1 100644 (file)
@@ -80,7 +80,7 @@ struct sm_t sm_scatterlock = {
 struct sm_state_t filelock[LOCK_MAX] = {
                       // stable     loner  rep state  r     rp   rd   wr   l    x    caps(any,loner,xlocker,replica)
     [LOCK_SYNC]      = { 0,         false, LOCK_SYNC, ANY,  0,   ANY, 0,   ANY, 0,   CEPH_CAP_GSHARED|CEPH_CAP_GCACHE|CEPH_CAP_GRD,0,0,CEPH_CAP_GSHARED|CEPH_CAP_GCACHE|CEPH_CAP_GRD },
-    [LOCK_LOCK_SYNC] = { LOCK_SYNC, false, LOCK_SYNC, AUTH, 0,   AUTH,0,   0,   0,   CEPH_CAP_GCACHE,0,0,0 },
+    [LOCK_LOCK_SYNC] = { LOCK_SYNC, false, LOCK_SYNC, AUTH, 0,   0,   0,   0,   0,   CEPH_CAP_GCACHE,0,0,0 },
     [LOCK_EXCL_SYNC] = { LOCK_SYNC, true,  LOCK_LOCK, 0,    0,   0,   0,   0,   0,   0,CEPH_CAP_GSHARED|CEPH_CAP_GCACHE|CEPH_CAP_GRD,0,0 },
     [LOCK_MIX_SYNC]  = { LOCK_SYNC, false, LOCK_MIX,  0,    0,   0,   0,   0,   0,   CEPH_CAP_GRD,0,0,CEPH_CAP_GRD },
     [LOCK_MIX_SYNC2] = { LOCK_SYNC, false, 0,         0,    0,   0,   0,   0,   0,   CEPH_CAP_GRD,0,0,CEPH_CAP_GRD },