]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: honor scatter_wanted flag in scatter_eval()
authorSage Weil <sage@newdream.net>
Wed, 27 Jul 2011 19:40:35 +0000 (12:40 -0700)
committerSage Weil <sage@newdream.net>
Wed, 27 Jul 2011 19:40:35 +0000 (12:40 -0700)
We do in file_eval, but not here.

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

index f162369c90ee01066030377a61dbccaca070d7f4..2f4cdc8af5ef32186e0107b8bc11e8c838f7ac3f 100644 (file)
@@ -3527,6 +3527,16 @@ void Locker::scatter_eval(ScatterLock *lock, bool *need_issue)
   if (lock->get_parent()->is_freezing_or_frozen())
     return;
   
+  if (!lock->is_rdlocked() &&
+      !lock->is_xlocked() &&
+      lock->get_state() != LOCK_MIX &&
+      lock->get_scatter_wanted()) {
+    dout(10) << "scatter_eval scatter_wanted, bump to mix " << *lock
+            << " on " << *lock->get_parent() << dendl;
+    scatter_mix(lock, need_issue);
+    return;
+  }
+
   if (lock->get_type() == CEPH_LOCK_INEST) {
     // in general, we want to keep INEST writable at all times.
     if (!lock->is_rdlocked() &&