]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix EXCL -> * check in file_eval to use loner_wanted, not issued
authorSage Weil <sage@newdream.net>
Tue, 26 May 2009 17:28:42 +0000 (10:28 -0700)
committerSage Weil <sage@newdream.net>
Tue, 26 May 2009 17:28:42 +0000 (10:28 -0700)
We should leave EXCL if the loner doesn't want the EXCL bits
(WR, EXCL, BUFFER), not if it's not issued (which is transitory).

src/mds/Locker.cc

index 37c3aaaf54d590141a542102b882b44d04730846..046f5f82d549985d430e546c1125868122758c21 100644 (file)
@@ -3036,7 +3036,7 @@ void Locker::file_eval(ScatterLock *lock, bool *need_issue)
     int loner_issued, other_issued, xlocker_issued;
     in->get_caps_issued(&loner_issued, &other_issued, &xlocker_issued, CEPH_CAP_SFILE);
 
-    if (!(loner_issued & (CEPH_CAP_GEXCL|CEPH_CAP_GWR|CEPH_CAP_GBUFFER)) ||
+    if (!(loner_wanted & (CEPH_CAP_GEXCL|CEPH_CAP_GWR|CEPH_CAP_GBUFFER)) ||
         (other_wanted & (CEPH_CAP_GEXCL|CEPH_CAP_GWR|CEPH_CAP_GBUFFER|CEPH_CAP_GRD|CEPH_CAP_GCACHE)) ||
        (in->inode.is_dir() && in->multiple_nonstale_caps())) {  // FIXME.. :/
       dout(20) << " should lose it" << dendl;