From: Xuehan Xu Date: Fri, 15 Mar 2024 11:48:33 +0000 (+0800) Subject: test/crimson/sesastore/test_block: add constructor to construct X-Git-Tag: v20.0.0~2387^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=61d7f8821fa06cf48911230228687abdf747dba2;p=ceph.git 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 --- diff --git a/src/test/crimson/seastore/test_block.h b/src/test/crimson/seastore/test_block.h index 3bf119f77260f..d605497ae9343 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));