Skip to content

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

Merged
batrick merged 1 commit into
ceph:masterfrom
xiubli:wip-50246-journal
May 4, 2021
Merged

batrick merged 1 commit into
ceph:masterfrom
xiubli:wip-50246-journal

Conversation

@xiubli

@xiubli xiubli commented Apr 21, 2021

Copy link
Copy Markdown
Member

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 [email protected]

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

@xiubli
xiubli 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
@xiubli xiubli added the bug-fix label Apr 21, 2021
@xiubli
xiubli force-pushed the wip-50246-journal branch from 7f50ee3 to cdc4cf5 Compare April 21, 2021 13:16

@batrick batrick left a comment

Copy link
Copy Markdown
Member

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

batrick commented Apr 21, 2021

Copy link
Copy Markdown
Member
../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 <[email protected]>
@xiubli

xiubli commented Apr 22, 2021

Copy link
Copy Markdown
Member Author
../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.

@xiubli
xiubli force-pushed the wip-50246-journal branch from cdc4cf5 to 79bb44c Compare April 22, 2021 01:28
@xiubli
xiubli requested a review from batrick April 22, 2021 01:28
@xiubli xiubli 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

batrick commented May 4, 2021

Copy link
Copy Markdown
Member

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