]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mds: adjust locking for subtree migration
authorYan, Zheng <zyan@redhat.com>
Mon, 16 Sep 2019 12:58:23 +0000 (20:58 +0800)
committerYan, Zheng <zyan@redhat.com>
Thu, 12 Dec 2019 18:04:12 +0000 (02:04 +0800)
commiteab59a85e121e3e42de8456f36dcec76863b8aba
treee8ef3f3c9511693dd2a155ffb4915a0ea80d2f6a
parent1e889cd035b604aa248b1aba1f11035d30b9e300
mds: adjust locking for subtree migration

Take snap rdlocks (instead of taking dentry locks) on subtree's ancestor
inodes. Path to subtree is stable after they are all locked.

For dirfragtree locks on subtree bounds, it's not convenient to rdlock
them in top-down order (paths to them are not stable). The solution is
kicking them to SYNC state and try taking rdlocks on all of them.

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