diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2013-04-05 07:53:39 +0800 |
---|---|---|
committer | Yan, Zheng <zheng.z.yan@intel.com> | 2013-05-28 13:57:21 +0800 |
commit | 5426c75d7b564b87ed14a9a0a4f7c3262a81668c (patch) | |
tree | 3bea50093d3b19c2a6d0da5b5b5d51e434af6140 | |
parent | d7b999be1b24ffd8b83370fcd9f0bd32829b8b35 (diff) | |
download | ceph-5426c75d7b564b87ed14a9a0a4f7c3262a81668c.tar.gz |
mds: adjust subtree auth if import aborts in PREPPED state
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
-rw-r--r-- | src/mds/Migrator.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc index 565d45ddc97..8103a5252cf 100644 --- a/src/mds/Migrator.cc +++ b/src/mds/Migrator.cc @@ -397,7 +397,7 @@ void Migrator::handle_mds_failure_or_stop(int who) cache->get_subtree_bounds(dir, bounds); import_remove_pins(dir, bounds); - // adjust auth back to me + // adjust auth back to the exporter cache->adjust_subtree_auth(dir, import_peer[df]); cache->try_subtree_merge(dir); // NOTE: may journal subtree_map as side-effect @@ -1684,6 +1684,12 @@ void Migrator::handle_export_cancel(MExportDirCancel *m) } else if (import_state[df] == IMPORT_PREPPED) { CDir *dir = mds->mdcache->get_dirfrag(df); assert(dir); + set<CDir*> bounds; + cache->get_subtree_bounds(dir, bounds); + import_remove_pins(dir, bounds); + // adjust auth back to the exportor + cache->adjust_subtree_auth(dir, import_peer[df]); + cache->try_subtree_merge(dir); import_reverse_unfreeze(dir); } else { assert(0 == "got export_cancel in weird state"); |