Merge pull request #46614 from xxhdx1985126/wip-backref-bug-fixes

crimson/os/seastore: bug fixes

Reviewed-by: Yingxin Cheng <yingxin.cheng@intel.com>
This commit is contained in:
Samuel Just 2022-06-21 16:17:21 -07:00 committed by GitHub
commit ae33f9c272
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -565,7 +565,7 @@ private:
auto start_iter = backref_inserted_set.lower_bound(
start,
backref_buf_entry_t::cmp_t());
auto end_iter = backref_inserted_set.upper_bound(
auto end_iter = backref_inserted_set.lower_bound(
end,
backref_buf_entry_t::cmp_t());
std::set<
@ -587,7 +587,7 @@ private:
auto start_iter = backref_remove_set.lower_bound(
start,
backref_buf_entry_t::cmp_t());
auto end_iter = backref_remove_set.upper_bound(
auto end_iter = backref_remove_set.lower_bound(
end,
backref_buf_entry_t::cmp_t());
std::set<

View File

@ -948,7 +948,8 @@ SegmentCleaner::gc_reclaim_space_ret SegmentCleaner::gc_reclaim_space()
return _retrieve_live_extents(
t, std::move(backrefs), extents);
}).si_then([this, &seq, &t](auto nseq) {
if (nseq != JOURNAL_SEQ_NULL && nseq > seq)
if (nseq != JOURNAL_SEQ_NULL &&
(nseq > seq || seq == JOURNAL_SEQ_NULL))
seq = nseq;
auto fut = BackrefManager::merge_cached_backrefs_iertr::now();
if (seq != JOURNAL_SEQ_NULL) {