diff options
author | Patrick Donnelly <pdonnell@redhat.com> | 2024-08-27 23:07:06 +0200 |
---|---|---|
committer | Patrick Donnelly <pdonnell@redhat.com> | 2024-09-25 21:42:26 +0200 |
commit | 98b7402b2723544d4421f65bd2c38bfb6aadfb54 (patch) | |
tree | 670a084dfecdfcffc339bc93d535f37b36d48f47 /src/mds | |
parent | mds: delay expiry if LogSegment is ahead of committed oft seq (diff) | |
download | ceph-98b7402b2723544d4421f65bd2c38bfb6aadfb54.tar.xz ceph-98b7402b2723544d4421f65bd2c38bfb6aadfb54.zip |
mds: do not trim segments after open file table commit
Previously, the trimming of expired segments would only occur if the open file
table's committed sequence number is past the segment to be trimmed. This is
now part of the expiry checks so it's no longer necessary to restart trimming
when the open file table commit completes.
Furthermore, this was confusing to `flush journal` as it was waiting for the
journal head write but the open file table commit already triggered the trim.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Diffstat (limited to 'src/mds')
-rw-r--r-- | src/mds/MDLog.cc | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/mds/MDLog.cc b/src/mds/MDLog.cc index 0f33bacbd3e..99f86231847 100644 --- a/src/mds/MDLog.cc +++ b/src/mds/MDLog.cc @@ -585,17 +585,6 @@ void MDLog::shutdown() } } -class C_OFT_Committed : public MDSInternalContext { - MDLog *mdlog; - uint64_t seq; -public: - C_OFT_Committed(MDLog *l, uint64_t s) : - MDSInternalContext(l->mds), mdlog(l), seq(s) {} - void finish(int ret) override { - mdlog->trim_expired_segments(); - } -}; - void MDLog::try_to_commit_open_file_table(uint64_t last_seq) { ceph_assert(ceph_mutex_is_locked_by_me(submit_mutex)); @@ -610,8 +599,7 @@ void MDLog::try_to_commit_open_file_table(uint64_t last_seq) if (mds->mdcache->open_file_table.is_any_dirty() || last_seq > mds->mdcache->open_file_table.get_committed_log_seq()) { submit_mutex.unlock(); - mds->mdcache->open_file_table.commit(new C_OFT_Committed(this, last_seq), - last_seq, CEPH_MSG_PRIO_HIGH); + mds->mdcache->open_file_table.commit(nullptr, last_seq, CEPH_MSG_PRIO_HIGH); submit_mutex.lock(); } } |