]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: move to from loner -> mix if *anyone* wants rd|wr
authorSage Weil <sage@inktank.com>
Tue, 6 Nov 2012 07:27:13 +0000 (23:27 -0800)
committerSage Weil <sage@inktank.com>
Tue, 6 Nov 2012 07:06:03 +0000 (23:06 -0800)
We were either going to MIX or SYNC depending on whether non-loners wanted
to read/write, but it may be that the loner wants to if our logic for
choosing loner vs not longer is based on anything other that just rd|wr
wanted.

Signed-off-by: Sage Weil <sage@inktank.com>
src/mds/Locker.cc

index 651e11342e0e9fc71ddc506b1a6c4ff406d714ac..8b771852d49f9f6dfea6609d3c915e67a594a5d2 100644 (file)
@@ -4005,7 +4005,7 @@ void Locker::file_eval(ScatterLock *lock, bool *need_issue)
        (in->inode.is_dir() && in->multiple_nonstale_caps())) {  // FIXME.. :/
       dout(20) << " should lose it" << dendl;
       // we should lose it.
-      if ((other_wanted & (CEPH_CAP_GRD|CEPH_CAP_GWR)) ||
+      if (((other_wanted|loner_wanted) & (CEPH_CAP_GRD|CEPH_CAP_GWR)) ||
          lock->is_waiter_for(SimpleLock::WAIT_WR))
        scatter_mix(lock, need_issue);
       else if (!lock->is_wrlocked())   // let excl wrlocks drain first