]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: check earlier if directories are already exported 26056/head
authorRishabh Dave <ridave@redhat.com>
Thu, 7 Mar 2019 05:00:09 +0000 (10:30 +0530)
committerRishabh Dave <ridave@redhat.com>
Fri, 8 Mar 2019 07:01:58 +0000 (12:31 +0530)
Signed-off-by: Rishabh Dave <ridave@redhat.com>
src/mds/Migrator.cc

index 847e2e0d47e10c253719cda39559fa8a6aad01b1..1979201236e941d1cfd4e11d3edbd6b6f876f379 100644 (file)
@@ -777,6 +777,11 @@ void Migrator::export_dir(CDir *dir, mds_rank_t dest)
   ceph_assert(dir->is_auth());
   ceph_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;
@@ -805,11 +810,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() ||