]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/crimson/sesastore/test_block: add constructor to construct 56217/head
authorXuehan Xu <xuxuehan@qianxin.com>
Fri, 15 Mar 2024 11:48:33 +0000 (19:48 +0800)
committerXuehan Xu <xuxuehan@qianxin.com>
Fri, 15 Mar 2024 11:48:33 +0000 (19:48 +0800)
non-fully-loaded TestBlocks

Before this commit, all TestBlocks are fully-loaded whether they do have
data or not.

Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
src/test/crimson/seastore/test_block.h

index 3bf119f77260fb420ad89cb963ec1148f1e8fe61..d605497ae934307b14606f0c89fda4ffc13b037d 100644 (file)
@@ -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));