From: Yingxin Cheng Date: Mon, 25 Jul 2022 05:35:37 +0000 (+0800) Subject: crimson/os/seastore: drop journal_seq_t NO_DELTAS X-Git-Tag: v18.0.0~426^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1eb30662c3596a225fc541a1d908731a0db57aad;p=ceph.git crimson/os/seastore: drop journal_seq_t NO_DELTAS Signed-off-by: Yingxin Cheng --- diff --git a/src/crimson/os/seastore/cache.cc b/src/crimson/os/seastore/cache.cc index c889861ffe3e..b91a7272d9ae 100644 --- a/src/crimson/os/seastore/cache.cc +++ b/src/crimson/os/seastore/cache.cc @@ -759,7 +759,7 @@ void Cache::commit_retire_extent( { remove_extent(ref); - ref->dirty_from_or_retired_at = JOURNAL_SEQ_MAX; + ref->dirty_from_or_retired_at = JOURNAL_SEQ_NULL; invalidate_extent(t, *ref); } @@ -1753,10 +1753,8 @@ Cache::get_next_dirty_extents_ret Cache::get_next_dirty_extents( i != dirty.end() && bytes_so_far < max_bytes; ++i) { auto dirty_from = i->get_dirty_from(); - if (unlikely(!(dirty_from != JOURNAL_SEQ_NULL && - dirty_from != JOURNAL_SEQ_MAX && - dirty_from != NO_DELTAS))) { - ERRORT("{}", t, *i); + if (unlikely(dirty_from == JOURNAL_SEQ_NULL)) { + ERRORT("got dirty extent with JOURNAL_SEQ_NULL -- {}", t, *i); ceph_abort(); } if (dirty_from < seq) { diff --git a/src/crimson/os/seastore/journal/segment_allocator.cc b/src/crimson/os/seastore/journal/segment_allocator.cc index 0b22f3ad8784..81c937bfda98 100644 --- a/src/crimson/os/seastore/journal/segment_allocator.cc +++ b/src/crimson/os/seastore/journal/segment_allocator.cc @@ -76,8 +76,8 @@ SegmentAllocator::do_open(bool is_mkfs) } } else { // OOL ceph_assert(!is_mkfs); - dirty_tail = NO_DELTAS; - alloc_tail = NO_DELTAS; + dirty_tail = JOURNAL_SEQ_NULL; + alloc_tail = JOURNAL_SEQ_NULL; } auto header = segment_header_t{ new_segment_seq, diff --git a/src/crimson/os/seastore/seastore_types.cc b/src/crimson/os/seastore/seastore_types.cc index 72ab3b81f051..6307f303061b 100644 --- a/src/crimson/os/seastore/seastore_types.cc +++ b/src/crimson/os/seastore/seastore_types.cc @@ -136,8 +136,6 @@ std::ostream &operator<<(std::ostream &out, const journal_seq_t &seq) return out << "JOURNAL_SEQ_NULL"; } else if (seq == JOURNAL_SEQ_MIN) { return out << "JOURNAL_SEQ_MIN"; - } else if (seq == NO_DELTAS) { - return out << "JOURNAL_SEQ_NO_DELTAS"; } else { return out << "journal_seq_t(" << "segment_seq=" << segment_seq_printer_t{seq.segment_seq} diff --git a/src/crimson/os/seastore/seastore_types.h b/src/crimson/os/seastore/seastore_types.h index a7849b0a20e6..e4f4fa61e8c6 100644 --- a/src/crimson/os/seastore/seastore_types.h +++ b/src/crimson/os/seastore/seastore_types.h @@ -854,10 +854,6 @@ constexpr journal_seq_t JOURNAL_SEQ_MAX{ }; // JOURNAL_SEQ_NULL == JOURNAL_SEQ_MAX == journal_seq_t{} constexpr journal_seq_t JOURNAL_SEQ_NULL = JOURNAL_SEQ_MAX; -constexpr journal_seq_t NO_DELTAS = journal_seq_t{ - NULL_SEG_SEQ, - P_ADDR_ZERO -}; // logical addr, see LBAManager, TransactionManager using laddr_t = uint64_t;