]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: move from EXCL to SYNC if nobody wants to write
authorSage Weil <sage@inktank.com>
Wed, 5 Dec 2012 13:56:37 +0000 (05:56 -0800)
committerSam Lang <sam.lang@inktank.com>
Fri, 7 Dec 2012 20:18:40 +0000 (10:18 -1000)
We were moving to the MIX even if nobody wanted to write; that is not
useful, since if we only want to read SYNC will let us cache those reads.
SYNC is also a more friendly place (all things equal) to be.

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

index 16cfe7f27a8e548264d320c18c30415c097587bb..0faf8dca5e27c3f5ce8c475653bb503e2a8a579a 100644 (file)
@@ -4025,7 +4025,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|loner_wanted) & (CEPH_CAP_GRD|CEPH_CAP_GWR)) ||
+      if (((other_wanted|loner_wanted) & 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