From: Patrick Donnelly Date: Mon, 8 Jun 2020 23:50:44 +0000 (-0700) Subject: mds: allow export of pinned directory if empty X-Git-Tag: v16.1.0~1933^2~15 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4749e5abb16a38b34ed63d11dbcd8bf3831b3f13;p=ceph.git mds: allow export of pinned directory if empty Signed-off-by: Patrick Donnelly --- diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc index 874e56416aa6..355cc3c0dfa5 100644 --- a/src/mds/Migrator.cc +++ b/src/mds/Migrator.cc @@ -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())) {