]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: cleanup truncating inodes when standby replay mds trim log segments 31286/head
authorYan, Zheng <zyan@redhat.com>
Fri, 21 Jun 2019 08:24:51 +0000 (16:24 +0800)
committerYan, Zheng <zyan@redhat.com>
Thu, 31 Oct 2019 11:24:08 +0000 (19:24 +0800)
commit028eb3fdfb2346b3ed1ebfc3c3198ec99e21154c
tree1c7a1936511e7effd0dbb5f362490ed3d43edeaf
parentca6233676d368600b083b2d544eb87793d591627
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)

Conflicts:
       src/mds/MDCache.cc
src/mds/MDCache.cc