New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mds: miscellaneous multimds fixes #14550

merged 18 commits into from May 23, 2017


None yet
3 participants

ukernel commented Apr 14, 2017

No description provided.


This comment has been minimized.

@ukernel ukernel changed the title from [DNM] mds: miscellaneous multimds fixes to mds: miscellaneous multimds fixes Apr 24, 2017


This comment has been minimized.

ukernel added some commits Mar 29, 2017

mon/MDSMonitor: only allow deactivating the mds with max rank
Signed-off-by: "Yan, Zheng" <>
mds: free mdsdir inode/dirfrag during stopping mds
make valgrind happy

Signed-off-by: "Yan, Zheng" <>
mds: fix valgrind UninitValue warning
Signed-off-by: "Yan, Zheng" <>
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" <>
mds: export subtrees in stray inode to auth mds of its parent inode
Signed-off-by: "Yan, Zheng" <>
mds: drop dirty dentries in subtree of deleted directory
Make slave commit code of rename/rmdir drop dirty dentries in subtree
dirfrag of deleted directory.

Signed-off-by: "Yan, Zheng" <>
mds: use 'is in stray' instead 'nlink == 0' to check deleted inodes
Checking inode's nlink is not reliable when mds is not auth mds of
the inode.

This patch also removes the code that skips committing dirfrag of
deleted inode. it's not safe for uncommitted slave rmmdir.

Signed-off-by: "Yan, Zheng" <>
mds: clear scatter dirty when deleting directory
Signed-off-by: "Yan, Zheng" <>
mds: check dirfrag bloom filter when handling discover
Signed-off-by: "Yan, Zheng" <>
mds: forbid discovering purging inode
Signed-off-by: "Yan, Zheng" <>
mds: handle open remote dentry race
Signed-off-by: "Yan, Zheng" <>
mds: flush journal when gathering replica lock
Signed-off-by: "Yan, Zheng" <>
mds: remove session from null_sessions list when marking session dirty
When saving sessionmap, null_sessions is processed after the dirty_sessions.
The dirty session gets deleted from omap if it's still in null_sessions.

Signed-off-by: "Yan, Zheng" <>
mds: don't finish dentry waiters when splitting/merging dirfrags
move dentry waiters to the new dirfrags instead

Signed-off-by: "Yan, Zheng" <>
mds: don't pin dirfrag for DISCOVERBASE
The reference triggers assertion when fragmentating the dirfrag.
pin parent inode instead.

Signed-off-by: "Yan, Zheng" <>
mds: add source/dest information to EImportStart/EExport
Signed-off-by: "Yan, Zheng" <>
mds: check frag bits limit before split dirfrag
Signed-off-by: "Yan, Zheng" <>
mds: properly set new dirfrag's dir_auth when merging dirfrags
new dirfrag's dir_auth is updated at very beginning of CDir::merge()

Signed-off-by: "Yan, Zheng" <>

jcsp approved these changes May 23, 2017

@jcsp jcsp merged commit e875d7d into ceph:master May 23, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Unmodifed Submodules submodules for project are unmodified
default Build finished.

@ukernel ukernel deleted the ukernel:wip-multimds-misc branch Jun 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment