From: Yingxin Cheng Date: Wed, 18 Jun 2025 06:31:04 +0000 (+0800) Subject: crimson/os/seastore/transaction: add asserts related to read-set X-Git-Tag: v21.0.0~256^2~372^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8e923953bb3a3839e47b99ad64c64cede6b27cd3;p=ceph.git crimson/os/seastore/transaction: add asserts related to read-set Signed-off-by: Yingxin Cheng --- diff --git a/src/crimson/os/seastore/transaction.h b/src/crimson/os/seastore/transaction.h index 7a1e37c43e96..aec315fb0636 100644 --- a/src/crimson/os/seastore/transaction.h +++ b/src/crimson/os/seastore/transaction.h @@ -165,6 +165,7 @@ public: bool is_paddr_known; }; maybe_add_readset_ret maybe_add_to_read_set(CachedExtentRef ref) { + assert(ref->is_stable()); assert(ref->get_paddr().is_absolute() || ref->get_paddr().is_record_relative()); if (is_weak()) { @@ -177,6 +178,7 @@ public: } else { // paddr is unknown until wait_io() finished // to call maybe_add_to_read_set_step_2(ref) + assert(ref->is_pending_io()); ceph_assert(ref->get_paddr().is_record_relative()); bool added = maybe_add_to_read_set_step_1(ref); return {added, false}; @@ -673,6 +675,7 @@ private: void maybe_add_to_read_set_step_2(CachedExtentRef ref) { // paddr must be known for read_set + assert(ref->is_stable_ready()); ceph_assert(ref->get_paddr().is_absolute()); if (is_weak()) { return;