]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: handle linkage mismatch during cache rejoin
authorYan, Zheng <zheng.z.yan@intel.com>
Thu, 14 Mar 2013 12:06:27 +0000 (20:06 +0800)
committerGreg Farnum <greg@inktank.com>
Mon, 1 Apr 2013 16:25:59 +0000 (09:25 -0700)
commitd1a257498c37e92603f777ed991962e556be4327
treef9cdf9d6bfd753659f1784ae55bc80241b168be8
parentce0b74e55e6647ccecf01aa001849bf1eb3f4185
mds: handle linkage mismatch during cache rejoin

For MDS cluster, not all file system namespace operations that impact
multiple MDS use two phase commit. Some operations use dentry link/unlink
message to update replica dentry's linkage after they are committed by
the master MDS. It's possible the master MDS crashes after journaling an
operation, but before sending the dentry link/unlink messages. Later when
the MDS recovers and receives cache rejoin messages from the surviving
MDS, it will find linkage mismatch.

The original cache rejoin code does not properly handle the case that
dentry unlink messages were missing. Unlinked inodes were linked to stray
dentries. So the cache rejoin ack message need push replicas of these
stray dentries to the surviving MDS.

This patch also adds code that handles cache expiration in the middle of
cache rejoining.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
src/mds/MDCache.cc
src/mds/MDCache.h
src/mds/mdstypes.h