]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: check earlier if directories are already exported 27679/head
authorRishabh Dave <ridave@redhat.com>
Thu, 7 Mar 2019 05:00:09 +0000 (10:30 +0530)
committerRishabh Dave <ridave@redhat.com>
Wed, 24 Apr 2019 10:31:10 +0000 (16:01 +0530)
Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit 46fb90734f371b5467d81cae25c06f8a487a3041)

src/mds/Migrator.cc

index 85f6b3b726ebd9b88f9f49e3a02881d415c65c0b..27da586cd4cdca674c784ffcb7b71386902f9f49 100644 (file)
@@ -796,6 +796,11 @@ void Migrator::export_dir(CDir *dir, mds_rank_t dest)
   assert(dir->is_auth());
   assert(dest != mds->get_nodeid());
    
+  if (!mds->is_stopping() && !dir->inode->is_exportable(dest)) {
+    dout(25) << "dir is export pinned" << dendl;
+    return;
+  }
+
   if (!(mds->is_active() || mds->is_stopping())) {
     dout(7) << "i'm not active, no exports for now" << dendl;
     return;
@@ -824,11 +829,6 @@ void Migrator::export_dir(CDir *dir, mds_rank_t dest)
       dout(7) << "i won't export anything in stray" << dendl;
       return;
     }
-  } else {
-    if (!mds->is_stopping() && !dir->inode->is_exportable(dest)) {
-      dout(7) << "dir is export pinned" << dendl;
-      return;
-    }
   }
 
   if (dir->is_frozen() ||