]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: cleanup truncating inodes when standby replay mds trim log segments 29232/head
authorYan, Zheng <zyan@redhat.com>
Fri, 21 Jun 2019 08:24:51 +0000 (16:24 +0800)
committerNathan Cutler <ncutler@suse.com>
Sat, 7 Sep 2019 09:30:17 +0000 (11:30 +0200)
commitda63b206523f109a03d61155bd4bb65bf6895d48
treee8fa505c1419871e627aa448d3d44b6bfe352aaf
parentaf0d1db6cf4af567b327fbf54e72bf9f82e1a81f
mds: cleanup truncating inodes when standby replay mds trim log segments

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 32121878dd0eef11e481162ebf924a14a91dd341)
src/mds/MDCache.cc