]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: avoid race between cache expire and pushing replicas
authorYan, Zheng <zheng.z.yan@intel.com>
Sun, 19 Jan 2014 10:37:22 +0000 (18:37 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Mon, 17 Feb 2014 01:37:51 +0000 (09:37 +0800)
commit22535340b402bd4a466f85d11d937f7b2513d6c5
treeeeb8f28c6e7f856ec0f9b5ac0311cb402e48399c
parentcc77ef2d52666b62152024ae9b8b4ac98cb54950
mds: avoid race between cache expire and pushing replicas

MDentryLink and MMDSFragmentNotify push replica inode/dirfrags
to other MDS. They both are racy because, when the target MDS
receives them, it may has expired the replicaed inode/dirfrags'
ancestor. The race creates unconnected replica inode/dirfrags,
unconnected replicas are problematic for subtree migration
because migrator sends MExportDirNotify according to subtree
dirfrag's replica list. MDS that contains unconnected replicas
may not receive MExportDirNotify.

The fix is, for MDentryLink and MMDSFragmentNotify messages
that may be received later, we avoid trimming their parent
replica objects. If null replica dentry is not readable, we
may receive a MDentryLink message later. If replica inode's
dirfragtreelock is not readable, it's likely some dirfrags
of the inode are being fragmented, we may receive a
MMDSFragmentNotify message later.

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