]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/Locker: if a client asks for file caps, prioritize file recovery
authorSage Weil <sage@redhat.com>
Thu, 14 Aug 2014 22:08:43 +0000 (15:08 -0700)
committerSage Weil <sage@redhat.com>
Thu, 28 Aug 2014 20:09:25 +0000 (13:09 -0700)
This normally happens when a process opens the file.  Prioritize in that
case.

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

index c1d78d517140a34119d400ccaf995ea38fff004d..667bf55e238998304627aa669bcad483cea76db6 100644 (file)
@@ -2356,6 +2356,12 @@ void Locker::adjust_cap_wanted(Capability *cap, int wanted, int issue_seq)
       cur->item_open_file.remove_myself();
     }
   } else {
+    if (cur->state_test(CInode::STATE_RECOVERING) &&
+       (cap->wanted() & (CEPH_CAP_FILE_RD |
+                         CEPH_CAP_FILE_WR))) {
+      mds->mdcache->recovery_queue.prioritize(cur);
+    }
+
     if (!cur->item_open_file.is_on_list()) {
       dout(10) << " adding to open file list " << *cur << dendl;
       assert(cur->last == CEPH_NOSNAP);