From 61d7f8821fa06cf48911230228687abdf747dba2 Mon Sep 17 00:00:00 2001 From: Xuehan Xu Date: Fri, 15 Mar 2024 19:48:33 +0800 Subject: [PATCH] test/crimson/sesastore/test_block: add constructor to construct non-fully-loaded TestBlocks Before this commit, all TestBlocks are fully-loaded whether they do have data or not. Signed-off-by: Xuehan Xu --- src/test/crimson/seastore/test_block.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/crimson/seastore/test_block.h b/src/test/crimson/seastore/test_block.h index 3bf119f7726..d605497ae93 100644 --- a/src/test/crimson/seastore/test_block.h +++ b/src/test/crimson/seastore/test_block.h @@ -55,6 +55,8 @@ struct TestBlock : crimson::os::seastore::LogicalCachedExtent { : LogicalCachedExtent(std::move(ptr)) {} TestBlock(const TestBlock &other) : LogicalCachedExtent(other), modified_region(other.modified_region) {} + TestBlock(extent_len_t length) + : LogicalCachedExtent(length) {} CachedExtentRef duplicate_for_write(Transaction&) final { return CachedExtentRef(new TestBlock(*this)); -- 2.39.5