]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix for MDCache::disambiguate_imports
authorYan, Zheng <zheng.z.yan@intel.com>
Wed, 16 Jan 2013 12:22:03 +0000 (20:22 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Tue, 29 Jan 2013 02:17:36 +0000 (10:17 +0800)
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>
src/mds/MDCache.cc

index 9a8d7e7deebed8483b9c2c8117c12e974ae02195..e75e87d5554a94475be36751f3610f7e9ad2d0e3 100644 (file)
@@ -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);