mirror of
https://github.com/ceph/ceph
synced 2024-12-16 00:15:35 +00:00
Merge PR #17689 into master
* refs/remotes/upstream/pull/17689/head: ceph: fix "stopping mds can't export subtree" Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
This commit is contained in:
commit
f818905e0f
@ -6498,7 +6498,8 @@ bool MDCache::trim(int max, int count)
|
||||
if (!diri->is_auth() && !diri->is_base() &&
|
||||
dir->get_num_head_items() == 0) {
|
||||
if (dir->state_test(CDir::STATE_EXPORTING) ||
|
||||
dir->is_freezing() || dir->is_frozen() || !mds->is_active())
|
||||
!(mds->is_active() || mds->is_stopping()) ||
|
||||
dir->is_freezing() || dir->is_frozen())
|
||||
continue;
|
||||
|
||||
migrator->export_empty_import(dir);
|
||||
|
@ -776,6 +776,10 @@ void Migrator::export_dir(CDir *dir, mds_rank_t dest)
|
||||
assert(dir->is_auth());
|
||||
assert(dest != mds->get_nodeid());
|
||||
|
||||
if (!(mds->is_active() || mds->is_stopping())) {
|
||||
dout(7) << "i'm not active, no exports for now" << dendl;
|
||||
return;
|
||||
}
|
||||
if (mds->mdcache->is_readonly()) {
|
||||
dout(7) << "read-only FS, no exports for now" << dendl;
|
||||
return;
|
||||
@ -793,10 +797,6 @@ void Migrator::export_dir(CDir *dir, mds_rank_t dest)
|
||||
//ceph_abort();
|
||||
return;
|
||||
}
|
||||
if (!mds->is_active()) {
|
||||
dout(7) << "i'm not active, no exports for now" << dendl;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!dir->inode->is_base() && dir->inode->get_projected_parent_dir()->inode->is_stray() &&
|
||||
dir->inode->get_projected_parent_dir()->get_parent_dir()->ino() != MDS_INO_MDSDIR(dest)) {
|
||||
|
Loading…
Reference in New Issue
Block a user