Skip to content

mds: do not trim the inodes from the lru list in standby_replay#40963

Merged
batrick merged 1 commit intoceph:masterfrom
lxbsz:wip-50246-journal
May 4, 2021
Merged

mds: do not trim the inodes from the lru list in standby_replay#40963
batrick merged 1 commit intoceph:masterfrom
lxbsz:wip-50246-journal

Conversation

@lxbsz
Copy link
Member

@lxbsz lxbsz commented Apr 21, 2021

In standby_replay, if some dentries just added and linked not get a
chance to replay the EOpen journals followed, if the upkeep_main() is
excuted, which will may trim them out immediately. Then when playing
the EOpen journals later the replay will fail.

In standby_replay, let's skip trimming them if dentry's linkage inode
is not nullptr.

Fixes: https://tracker.ceph.com/issues/50246
Signed-off-by: Xiubo Li xiubli@redhat.com

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@lxbsz lxbsz requested a review from batrick April 21, 2021 13:14
@github-actions github-actions bot added the cephfs Ceph File System label Apr 21, 2021
@lxbsz lxbsz added the bug-fix label Apr 21, 2021
@lxbsz lxbsz force-pushed the wip-50246-journal branch from 7f50ee3 to cdc4cf5 Compare April 21, 2021 13:16
Copy link
Member

@batrick batrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

For the commit title mds: do not trim the inodes from the lru list in standbyplay, please fix the state name: standby-replay.

@batrick
Copy link
Member

batrick commented Apr 21, 2021

../src/mds/MDCache.cc: In member function 'std::pair<bool, long unsigned int> MDCache::trim_lru(uint64_t, MDCache::expiremap&)':
../src/mds/MDCache.cc:6678:56: error: expected ')' before '{' token
 6678 |     if ((is_standby_replay && dn->get_linkage()->inode) {
      |        ~                                               ^~
      |                                                        )
../src/mds/MDCache.cc:6689:3: error: expected primary-expression before '}' token
 6689 |   }
      |   ^

In standby_replay, if some dentries just added/linked but not get a
chance to replay the EOpen journals followed, if the upkeep_main() is
excuted, which will may trim them out immediately. Then when playing
the EOpen journals later the replay will fail.

In standby_replay, let's skip trimming them if dentry's linkage inode
is not nullptr.

Fixes: https://tracker.ceph.com/issues/50246
Signed-off-by: Xiubo Li <xiubli@redhat.com>
@lxbsz
Copy link
Member Author

lxbsz commented Apr 22, 2021

../src/mds/MDCache.cc: In member function 'std::pair<bool, long unsigned int> MDCache::trim_lru(uint64_t, MDCache::expiremap&)':
../src/mds/MDCache.cc:6678:56: error: expected ')' before '{' token
 6678 |     if ((is_standby_replay && dn->get_linkage()->inode) {
      |        ~                                               ^~
      |                                                        )
../src/mds/MDCache.cc:6689:3: error: expected primary-expression before '}' token
 6689 |   }
      |   ^

Sorry, the fix still in my git stash. Will repush it.

@lxbsz lxbsz force-pushed the wip-50246-journal branch from cdc4cf5 to 79bb44c Compare April 22, 2021 01:28
@lxbsz lxbsz requested a review from batrick April 22, 2021 01:28
@lxbsz lxbsz changed the title mds: do not trim the inodes from the lru list in standbyplay mds: do not trim the inodes from the lru list in standby_replay Apr 22, 2021
@batrick
Copy link
Member

batrick commented May 4, 2021

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants