]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix file recovery
authorSage Weil <sage@newdream.net>
Wed, 1 Oct 2008 18:39:42 +0000 (11:39 -0700)
committerSage Weil <sage@newdream.net>
Wed, 1 Oct 2008 18:39:42 +0000 (11:39 -0700)
Make state bits distinct.  Duh.

Also, if an inode is queued for recovery, and doesn't need it later, unqueue it
(clear the bit, drop auth pin).

src/mds/CInode.h
src/mds/MDCache.cc

index e55d0081d7aeebd4cfe4b194e2fa3e159a62d7fc..901ddb89546c762420852a3615584be0bdd7fffd 100644 (file)
@@ -105,7 +105,7 @@ class CInode : public MDSCacheObject {
   static const int STATE_AMBIGUOUSAUTH = (1<<9);
   static const int STATE_EXPORTINGCAPS = (1<<10);
   static const int STATE_NEEDSRECOVER = (1<<11);
-  static const int STATE_RECOVERING = (1<<11);
+  static const int STATE_RECOVERING =   (1<<12);
 
   // -- waiters --
   static const __u64 WAIT_DIR         = (1<<0);
index db9d54009975a46d508510da76e99f49c6ed7a3a..5fd112744dc8613692ce241e8b63a3948d2ea17f 100644 (file)
@@ -3980,6 +3980,9 @@ void MDCache::do_file_recover()
     } else {
       dout(10) << "do_file_recover skipping " << in->inode.size << "/" << in->inode.max_size 
               << " " << *in << dendl;
+      in->state_clear(CInode::STATE_NEEDSRECOVER);
+      in->auth_unpin(this);
+      mds->locker->file_eval_gather(&in->filelock);
     }
   }
 }