]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: don't issue new caps with a revocation
authorSage Weil <sage@newdream.net>
Fri, 3 Apr 2009 23:49:37 +0000 (16:49 -0700)
committerSage Weil <sage@newdream.net>
Fri, 3 Apr 2009 23:49:37 +0000 (16:49 -0700)
This is a really just a heuristic...

src/mds/Locker.cc

index f4c60b724c6dd5b130071cfa143a0322173472dd..837ec0ffcdb145cc970bed8fa137d1abc2f90fe2 100644 (file)
@@ -1048,7 +1048,11 @@ bool Locker::issue_caps(CInode *in)
       // include caps that clients generally like, while we're at it.
       int likes = in->get_caps_liked();      
       int before = pending;
-      long seq = cap->issue((wanted|likes) & allowed);
+      long seq;
+      if (pending & ~allowed)
+       seq = cap->issue((wanted|likes) & allowed & pending);  // if revoking, don't issue anything new.
+      else
+       seq = cap->issue((wanted|likes) & allowed);
       int after = cap->pending();
 
       if (seq > 0 &&