]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/crimson/os/seastore/collection_manager/collection_flat_node.h
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / crimson / os / seastore / collection_manager / collection_flat_node.h
index 1652eb92f227ba3f7e3d0cd344df488638cc8eea..2690fb5fdf464bd64a48cb7935a8bb58367f255d 100644 (file)
@@ -94,11 +94,11 @@ struct CollectionNode
   : LogicalCachedExtent {
   using CollectionNodeRef = TCachedExtentRef<CollectionNode>;
 
-  bool loaded = false;
-
-  template <typename... T>
-  CollectionNode(T&&... t)
-    : LogicalCachedExtent(std::forward<T>(t)...) {}
+  explicit CollectionNode(ceph::bufferptr &&ptr)
+    : LogicalCachedExtent(std::move(ptr)) {}
+  explicit CollectionNode(const CollectionNode &other)
+    : LogicalCachedExtent(other),
+      decoded(other.decoded) {}
 
   static constexpr extent_types_t type = extent_types_t::COLL_BLOCK;
 
@@ -134,13 +134,11 @@ struct CollectionNode
   using update_ret = CollectionManager::update_ret;
   update_ret update(coll_context_t cc, coll_t coll, unsigned bits);
 
-  void read_to_local() {
-    if (loaded) return;
+  void on_clean_read() final {
     bufferlist bl;
     bl.append(get_bptr());
     auto iter = bl.cbegin();
     decode((base_coll_map_t&)decoded, iter);
-    loaded = true;
   }
 
   void copy_to_node() {