Skip to content

Commit 61d7f88

Browse files
committed
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 <[email protected]>
1 parent 758a0bc commit 61d7f88

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/test/crimson/seastore/test_block.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ struct TestBlock : crimson::os::seastore::LogicalCachedExtent {
5555
: LogicalCachedExtent(std::move(ptr)) {}
5656
TestBlock(const TestBlock &other)
5757
: LogicalCachedExtent(other), modified_region(other.modified_region) {}
58+
TestBlock(extent_len_t length)
59+
: LogicalCachedExtent(length) {}
5860

5961
CachedExtentRef duplicate_for_write(Transaction&) final {
6062
return CachedExtentRef(new TestBlock(*this));

0 commit comments

Comments
 (0)