diff options
author | Zhang Song <zhangsong325@gmail.com> | 2023-01-10 09:49:22 +0100 |
---|---|---|
committer | Zhang Song <zhangsong325@gmail.com> | 2023-03-15 02:21:08 +0100 |
commit | 944c1253bf52fb6f7d773b4bfeb5f7cc8f0ffebc (patch) | |
tree | eac658499c9398fa79124f6ae62dde0090407465 /src/crimson/os/seastore/async_cleaner.h | |
parent | crimson/os/seastore/EPM: refactor reserve process (diff) | |
download | ceph-944c1253bf52fb6f7d773b4bfeb5f7cc8f0ffebc.tar.xz ceph-944c1253bf52fb6f7d773b4bfeb5f7cc8f0ffebc.zip |
crimson/os/seastore: move ool segment seq allocator to EPM
Signed-off-by: Zhang Song <zhangsong325@gmail.com>
Diffstat (limited to 'src/crimson/os/seastore/async_cleaner.h')
-rw-r--r-- | src/crimson/os/seastore/async_cleaner.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/crimson/os/seastore/async_cleaner.h b/src/crimson/os/seastore/async_cleaner.h index 41f24547b41..dbdbcac72a2 100644 --- a/src/crimson/os/seastore/async_cleaner.h +++ b/src/crimson/os/seastore/async_cleaner.h @@ -1210,12 +1210,9 @@ public: config_t config, SegmentManagerGroupRef&& sm_group, BackrefManager &backref_manager, + SegmentSeqAllocator &segment_seq_allocator, bool detailed); - SegmentSeqAllocator& get_ool_segment_seq_allocator() { - return *ool_segment_seq_allocator; - } - void set_journal_trimmer(JournalTrimmer &_trimmer) { trimmer = &_trimmer; } @@ -1224,9 +1221,10 @@ public: config_t config, SegmentManagerGroupRef&& sm_group, BackrefManager &backref_manager, + SegmentSeqAllocator &ool_seq_allocator, bool detailed) { return std::make_unique<SegmentCleaner>( - config, std::move(sm_group), backref_manager, detailed); + config, std::move(sm_group), backref_manager, ool_seq_allocator, detailed); } /* @@ -1521,7 +1519,7 @@ private: auto new_usage = calc_utilization(segment); adjust_segment_util(old_usage, new_usage); if (s_type == segment_type_t::OOL) { - ool_segment_seq_allocator->set_next_segment_seq(seq); + ool_segment_seq_allocator.set_next_segment_seq(seq); } } @@ -1574,7 +1572,7 @@ private: BackgroundListener *background_callback = nullptr; // TODO: drop once paddr->journal_seq_t is introduced - SegmentSeqAllocatorRef ool_segment_seq_allocator; + SegmentSeqAllocator &ool_segment_seq_allocator; }; class RBMCleaner; |