This is a bug fix, otherwise if crimson-osd boot up multiple times without
filling up more than one segment, segments may be used up and can't be
reclaimed as they would have the same journal tail
Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
return journal->replay(
std::move(segments),
[this](auto seq, auto paddr, const auto &e) {
- return cache->replay_delta(seq, paddr, e);
+ auto fut = cache->replay_delta(seq, paddr, e);
+ segment_cleaner->update_journal_tail_target(
+ cache->get_oldest_dirty_from().value_or(seq));
+ return fut;
});
}).safe_then([this] {
return journal->open_for_write();