]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: fix open remote dirfrag deadlock
authorYan, Zheng <zheng.z.yan@intel.com>
Wed, 5 Mar 2014 01:14:56 +0000 (09:14 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Wed, 19 Mar 2014 03:35:56 +0000 (11:35 +0800)
commitb225ca97e8d0220035693e5a355479e9778ea231
treea56f71c9c322acacb17f048a55546eab60c270be
parentdc52581df5fefb8a9fdbedebc82e61794d07ab7a
mds: fix open remote dirfrag deadlock

During subtree migration, the importer may need to open subtree
bound dirfrags. Opening subtree bound dirfrags happens after the
exporter freeze the exporting subtee. So the discover message for
opening subtree bound dirfrags should not wait for any freezing
tree/directory, otherwise deadlock can happen.

In MDCache::handle_discover(), there are two cases can cause
discover messages wait for freezing tree/directory. One case is
fetching bare-bone dirfrags. Another case is, when merging dirfrags,
some of the dirfrags are frozen, some are freezing.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/mds/MDCache.cc
src/mds/MDCache.h