]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mds: create subtree root immediately after directory tree becomes frozen
authorYan, Zheng <zyan@redhat.com>
Tue, 6 Jun 2017 07:43:28 +0000 (15:43 +0800)
committerJohn Spray <john.spray@redhat.com>
Fri, 23 Jun 2017 16:07:32 +0000 (17:07 +0100)
commit944821fec1b4eab4fd4f787c9232f447e22de7bc
treef4be880ad2852fec9bdd622a251a85423196acc3
parent9d3bb981dc81348f6d9f6b984b4ea23afc4506fa
mds: create subtree root immediately after directory tree becomes frozen

When a directory tree become frozen, its WAIT_FROZEN contexts are
executed asynchronously. Before Migrator::export_frozen() set export
bounds, MDCache::try_subtree_merge_at() can merge newly imported
subtree into the frozen directory tree. This causes problem if there
are auth pins in newly imported subtree.

The fix is creating subtree root immediately after directory tree
becomes frozen. The new subtree root has dir_auth 'me, me', so it's
not meregeable.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
src/mds/CDir.cc
src/mds/Migrator.cc