]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: allow export of pinned directory if empty
authorPatrick Donnelly <pdonnell@redhat.com>
Mon, 8 Jun 2020 23:50:44 +0000 (16:50 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 24 Jun 2020 22:43:31 +0000 (15:43 -0700)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mds/Migrator.cc

index 874e56416aa68a85fb81082fcbe2808b3fbc5a93..355cc3c0dfa5440a3488e096d71929a59f07a1e2 100644 (file)
@@ -790,7 +790,7 @@ void Migrator::export_dir(CDir *dir, mds_rank_t dest)
   ceph_assert(dest != mds->get_nodeid());
    
   CDir* parent = dir->inode->get_projected_parent_dir();
-  if (!mds->is_stopping() && !dir->inode->is_exportable(dest)) {
+  if (!mds->is_stopping() && !dir->inode->is_exportable(dest) && dir->get_num_head_items() > 0) {
     dout(7) << "Cannot export to mds." << dest << " " << *dir << ": dir is export pinned" << dendl;
     return;
   } else if (!(mds->is_active() || mds->is_stopping())) {