]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: don't bump to sync if dir and subtree root
authorSage Weil <sage@newdream.net>
Fri, 19 Dec 2008 21:54:42 +0000 (13:54 -0800)
committerSage Weil <sage@newdream.net>
Tue, 23 Dec 2008 19:45:22 +0000 (11:45 -0800)
src/mds/Locker.cc

index 92feef0d3b94e7401e7bb00656b3458cef369a45..aabf0d8eca84be636456226f3d2a18bc8bef835a 100644 (file)
@@ -3479,7 +3479,9 @@ void Locker::file_eval(FileLock *lock)
   // * -> sync?
   else if (lock->get_state() != LOCK_SYNC &&
           !in->filelock.is_waiter_for(SimpleLock::WAIT_WR) &&
-          !(wanted & (CEPH_CAP_WR|CEPH_CAP_WRBUFFER))
+          !(wanted & (CEPH_CAP_WR|CEPH_CAP_WRBUFFER)) &&
+          !(in->get_state() == LOCK_MIXED &&
+            in->is_dir() && in->has_subtree_root_dirfrag())  // if we are a delegation point, stay where we are
           //((wanted & CEPH_CAP_RD) || 
           //in->is_replicated() || 
           //lock->get_num_client_lease() ||