]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: try_eval in many places
authorSage Weil <sage@newdream.net>
Wed, 27 Jul 2011 21:32:24 +0000 (14:32 -0700)
committerSage Weil <sage@newdream.net>
Thu, 28 Jul 2011 16:49:22 +0000 (09:49 -0700)
These are the obvious places where we drop locks and may need to defer the
eval until after unfreeze.  There are probably more; a full audit is in
order.

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

index e58ea42fd39cdc340e490108ab770328090ae0c7..48d64bba7f0badcc8f828f152f4a5af96f6f9b72 100644 (file)
@@ -719,7 +719,7 @@ void Locker::eval_gather(SimpleLock *lock, bool first, bool *pneed_issue, list<C
 
     if (lock->get_parent()->is_auth() &&
        lock->is_stable())
-      eval(lock, &need_issue);
+      try_eval(lock, &need_issue);
   }
 
   if (need_issue) {
@@ -1054,7 +1054,7 @@ void Locker::rdlock_finish(SimpleLock *lock, Mutation *mut, bool *pneed_issue)
     if (!lock->is_stable())
       eval_gather(lock, false, pneed_issue);
     else if (lock->get_parent()->is_auth())
-      eval(lock, pneed_issue);
+      try_eval(lock, pneed_issue);
   }
 }
 
@@ -1194,7 +1194,7 @@ void Locker::wrlock_finish(SimpleLock *lock, Mutation *mut, bool *pneed_issue)
     if (!lock->is_stable())
       eval_gather(lock, false, pneed_issue);
     else if (lock->get_parent()->is_auth())
-      eval(lock, pneed_issue);
+      try_eval(lock, pneed_issue);
   }
 }
 
@@ -1360,7 +1360,7 @@ void Locker::xlock_finish(SimpleLock *lock, Mutation *mut, bool *pneed_issue)
   if (!lock->is_stable())
     eval_gather(lock, false, &do_issue);
   else if (lock->get_parent()->is_auth())
-    eval(lock, &do_issue);
+    try_eval(lock, &do_issue);
   
   if (do_issue) {
     if (pneed_issue)
@@ -1697,7 +1697,7 @@ void Locker::revoke_stale_caps(Session *session)
       if (!in->xattrlock.is_stable()) eval_gather(&in->xattrlock);
 
       if (in->is_auth()) {
-       eval(in, CEPH_CAP_LOCKS);
+       try_eval(in, CEPH_CAP_LOCKS);
       } else {
        request_inode_file_caps(in);
       }
@@ -2755,7 +2755,7 @@ void Locker::remove_client_cap(CInode *in, client_t client)
     request_inode_file_caps(in);
   }
   
-  eval(in, CEPH_CAP_LOCKS);
+  try_eval(in, CEPH_CAP_LOCKS);
 
   mds->mdcache->maybe_eval_stray(in);
 }