From: Sage Weil Date: Wed, 1 Oct 2008 18:39:42 +0000 (-0700) Subject: mds: fix file recovery X-Git-Tag: v0.4~69 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1b3a1c4fe3f0e32afcbb27a43707ce985e795d9e;p=ceph.git mds: fix file recovery 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). --- diff --git a/src/mds/CInode.h b/src/mds/CInode.h index e55d0081d7ae..901ddb89546c 100644 --- a/src/mds/CInode.h +++ b/src/mds/CInode.h @@ -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); diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index db9d54009975..5fd112744dc8 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -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); } } }