]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/os/seastore/root_block: fix copy constructor
authorSamuel Just <sjust@redhat.com>
Tue, 26 May 2020 18:17:14 +0000 (11:17 -0700)
committerSamuel Just <sjust@redhat.com>
Tue, 2 Jun 2020 23:56:41 +0000 (16:56 -0700)
Otherwise, we don't appropriately initialize root.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/os/seastore/cached_extent.h
src/crimson/os/seastore/root_block.h

index 4f40a3ecd286079ad41a2bc9550b7c8c6112d7bc..6a464d3d907f2d1e7192a04b88c0272e642da3b6 100644 (file)
@@ -305,9 +305,9 @@ protected:
 
 
   friend class Cache;
-  template <typename T, typename... Args>
-  static TCachedExtentRef<T> make_cached_extent_ref(Args&&... args) {
-    return new T(std::forward<Args>(args)...);
+  template <typename T>
+  static TCachedExtentRef<T> make_cached_extent_ref(bufferptr &&ptr) {
+    return new T(std::move(ptr));
   }
 
   void set_paddr(paddr_t offset) { poffset = offset; }
index 96fc14dfb6d33383d15f389061667a926490a166..4ce8932c24e455577b0f0ced6536bca0e1c2aa56 100644 (file)
@@ -47,6 +47,8 @@ struct RootBlock : CachedExtent {
   template <typename... T>
   RootBlock(T&&... t) : CachedExtent(std::forward<T>(t)...) {}
 
+  RootBlock(const RootBlock &rhs) = default;
+
   CachedExtentRef duplicate_for_write() final {
     return CachedExtentRef(new RootBlock(*this));
   };