From 1b3a1c4fe3f0e32afcbb27a43707ce985e795d9e Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 1 Oct 2008 11:39:42 -0700 Subject: [PATCH] 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). --- src/mds/CInode.h | 2 +- src/mds/MDCache.cc | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mds/CInode.h b/src/mds/CInode.h index e55d0081d7aee..901ddb89546c7 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 db9d54009975a..5fd112744dc86 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); } } } -- 2.39.5