From 0dd693cc2b06d9c7a30e7c642b23179d1e6861ce Mon Sep 17 00:00:00 2001 From: Xuehan Xu Date: Fri, 17 Dec 2021 13:53:16 +0800 Subject: [PATCH] crimson/os/seastore/transaction: make sure the transaction's write_set is a subset of its read_set Signed-off-by: Xuehan Xu --- src/crimson/os/seastore/transaction.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/crimson/os/seastore/transaction.h b/src/crimson/os/seastore/transaction.h index 0d9cb02c0bd61..a3789cb9374ec 100644 --- a/src/crimson/os/seastore/transaction.h +++ b/src/crimson/os/seastore/transaction.h @@ -132,6 +132,7 @@ public: void add_mutated_extent(CachedExtentRef ref) { LOG_PREFIX(Transaction::add_mutated_extent); ceph_assert(!is_weak()); + assert(read_set.count(ref->prior_instance->get_paddr())); mutated_block_list.push_back(ref); TRACET("adding {} to write_set", *this, *ref); write_set.insert(*ref); -- 2.39.5