]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: track dentries that should be trimmed quickly in separate list
authorYan, Zheng <zyan@redhat.com>
Mon, 10 Apr 2017 11:54:47 +0000 (19:54 +0800)
committerYan, Zheng <zyan@redhat.com>
Thu, 11 May 2017 06:13:23 +0000 (14:13 +0800)
commit9317782b0e661610e63e7b214fcb97035032e0ee
tree31173c8bf6e81759809c0567ae0e7dca9b007e23
parent0196247c3ad24b8618fc56fe88b2d21db61485d7
mds: track dentries that should be trimmed quickly in separate list

To trim a null dentry quickly, current method is moving it to bottom
of LRU list. The method depends on the cache size config and if there
is non-null dentry at the bottom of LRU list (MDCache::trim() keeps
trimming null dentries regardless of cache size config. It stops when
encountering a non-null dentry). MDS can move dentry of any type to
bottom of the LRU, so the method does not work as expected. Besides,
it's hard to extend the code to trim other type of dentry quickly.

The fix is use separate list to track dentries that should be trimmed
quickly. Both null dentries and non-auth stray dentries are added to
the list.

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