Skip to content
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

mimic: mds: cleanup truncating inodes when standby replay mds trim log segments #30237

Closed
wants to merge 1 commit into from

Conversation

smithfarm
Copy link
Contributor

Standby replay mds first trims expired log segments, then replays new
log segments. It's possible a 'truncate_start' log event is in expired,
but its 'truncate_finish' counterpart is the new log segments. When mds
replays the 'truncate_finish' log event, log segment that contains the
'truncate_start' is already trimmed, so mds does nothing. This causes
leak of Inode::PIN_TRUNCATING and trigger assertion when removing
corresponding inode.

Fixes: https://tracker.ceph.com/issues/40477
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 3212187)
@smithfarm smithfarm added this to the mimic milestone Sep 7, 2019
@smithfarm smithfarm added the cephfs Ceph File System label Sep 7, 2019
@smithfarm
Copy link
Contributor Author

/home/jenkins-build/build/workspace/ceph-pull-requests/src/mds/MDCache.cc: In member function 'void MDCache::standby_trim_segment(LogSegment*)':
/home/jenkins-build/build/workspace/ceph-pull-requests/src/mds/MDCache.cc:7384:5: error: 'try_trim_inode' was not declared in this scope
     try_trim_inode(in);
     ^~~~~~~~~~~~~~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/mds/MDCache.cc:7384:5: note: suggested alternative: 'trim_inode'
     try_trim_inode(in);
     ^~~~~~~~~~~~~~
     trim_inode
src/mds/CMakeFiles/mds.dir/build.make:179: recipe for target 'src/mds/CMakeFiles/mds.dir/MDCache.cc.o' failed
make[3]: *** [src/mds/CMakeFiles/mds.dir/MDCache.cc.o] Error 1

@smithfarm
Copy link
Contributor Author

backport will be done in #29232

@smithfarm smithfarm closed this Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cephfs Ceph File System
Projects
None yet
2 participants