summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2013-01-16 20:22:03 +0800
committerYan, Zheng <zheng.z.yan@intel.com>2013-01-29 10:17:36 +0800
commitc93cf2d23b2b6aef73d0ca59294eeed1eebfa646 (patch)
treefb90272ea64f4f810570fb0737827ae992d7713c
parentbaa6bd6b1c1e0e09986fca208e3f86f4f8711e69 (diff)
downloadceph-c93cf2d23b2b6aef73d0ca59294eeed1eebfa646.tar.gz
mds: fix for MDCache::disambiguate_imports
In the resolve stage, if no MDS claims other MDS's disambiguous subtree import, the subtree's dir_auth is undefined. Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
-rw-r--r--src/mds/MDCache.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc
index 9a8d7e7deeb..e75e87d5554 100644
--- a/src/mds/MDCache.cc
+++ b/src/mds/MDCache.cc
@@ -3078,7 +3078,8 @@ void MDCache::disambiguate_imports()
CDir *dir = get_force_dirfrag(q->first);
if (!dir) continue;
- if (dir->is_ambiguous_auth()) { // works for me_ambig or if i am a surviving bystander
+ if (dir->is_ambiguous_auth() || // works for me_ambig or if i am a surviving bystander
+ dir->authority() == CDIR_AUTH_UNDEF) { // resolving
dout(10) << " mds." << who << " did import " << *dir << dendl;
adjust_bounded_subtree_auth(dir, q->second, who);
try_subtree_merge(dir);