]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: evaluate stray when releasing inode/dentry's reference
authorYan, Zheng <zheng.z.yan@intel.com>
Wed, 4 Sep 2013 03:13:57 +0000 (11:13 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Sun, 22 Sep 2013 06:14:15 +0000 (14:14 +0800)
commitcbf1f3ca1e6e0b38c9f37a44983c10654380e1d1
tree4386efe26b7c5656f76edc7ae72aefb7a5dba500
parentc63b4edcdc252fe960cfd8d9442df313c0ab12ce
mds: evaluate stray when releasing inode/dentry's reference

Current method to purge stray inode is call MDCache::maybe_eval_stray()
after releasing a reference to the stray inode/dentry. It's difficult
to make this method work correct, because there are so many places that
can release reference.

This patch solves the issue by calling MDCache::maybe_eval_stray()
in MDSCacheObject::put(). This avoids adding code that calls
MDCache::maybe_eval_stray() to each place that releases reference.

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