From d7c72248cb524b12826fe843d9f64e39f379f68c Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Mon, 1 Jun 2020 12:02:35 -0700 Subject: [PATCH] crimson/os/seastore/cached_extent: add buffer sharing constructor Signed-off-by: Samuel Just --- src/crimson/os/seastore/cached_extent.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/crimson/os/seastore/cached_extent.h b/src/crimson/os/seastore/cached_extent.h index 83d54c77ead..463f5eeae59 100644 --- a/src/crimson/os/seastore/cached_extent.h +++ b/src/crimson/os/seastore/cached_extent.h @@ -278,6 +278,7 @@ private: } protected: + CachedExtent(CachedExtent &&other) = default; CachedExtent(ceph::bufferptr &&ptr) : ptr(std::move(ptr)) {} CachedExtent(const CachedExtent &other) : state(other.state), @@ -285,6 +286,14 @@ protected: version(other.version), poffset(other.poffset) {} + struct share_buffer_t {}; + CachedExtent(const CachedExtent &other, share_buffer_t) : + state(other.state), + ptr(other.ptr), + version(other.version), + poffset(other.poffset) {} + + friend class Cache; template static TCachedExtentRef make_cached_extent_ref(Args&&... args) { -- 2.39.5