]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
test/crimson/sesastore/test_block: add constructor to construct
authorXuehan Xu <xuxuehan@qianxin.com>
Fri, 15 Mar 2024 11:48:33 +0000 (19:48 +0800)
committerMatan Breizman <mbreizma@redhat.com>
Wed, 8 May 2024 07:13:29 +0000 (10:13 +0300)
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>
(cherry picked from commit 61d7f8821fa06cf48911230228687abdf747dba2)

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));