]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: bind attrs to bluestore_cache_meta mempool. 38310/head
authorIgor Fedotov <ifedotov@suse.com>
Sun, 20 Sep 2020 10:45:28 +0000 (13:45 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Thu, 26 Nov 2020 19:15:29 +0000 (22:15 +0300)
This seems to be a better choice over bluestore_cache_data

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit f4e09fc103454fa8a41b5ffb822639368a89522d)

src/os/bluestore/BlueStore.cc
src/os/bluestore/bluestore_types.h

index 9a6e46db9da5475c888834684985354e432df658..381203cdf8ed9702083c0fd92540af5fff9c8cb5 100644 (file)
@@ -3432,7 +3432,7 @@ BlueStore::Onode* BlueStore::Onode::decode(
   auto p = v.front().begin_deep();
   on->onode.decode(p);
   for (auto& i : on->onode.attrs) {
-    i.second.reassign_to_mempool(mempool::mempool_bluestore_cache_data);
+    i.second.reassign_to_mempool(mempool::mempool_bluestore_cache_meta);
   }
 
   // initialize extent_map
@@ -13743,10 +13743,10 @@ int BlueStore::_setattr(TransContext *txc,
   if (val.is_partial()) {
     auto& b = o->onode.attrs[name.c_str()] = bufferptr(val.c_str(),
                                                       val.length());
-    b.reassign_to_mempool(mempool::mempool_bluestore_cache_data);
+    b.reassign_to_mempool(mempool::mempool_bluestore_cache_meta);
   } else {
     auto& b = o->onode.attrs[name.c_str()] = val;
-    b.reassign_to_mempool(mempool::mempool_bluestore_cache_data);
+    b.reassign_to_mempool(mempool::mempool_bluestore_cache_meta);
   }
   txc->write_onode(o);
   dout(10) << __func__ << " " << c->cid << " " << o->oid
@@ -13769,10 +13769,10 @@ int BlueStore::_setattrs(TransContext *txc,
     if (p->second.is_partial()) {
       auto& b = o->onode.attrs[p->first.c_str()] =
        bufferptr(p->second.c_str(), p->second.length());
-      b.reassign_to_mempool(mempool::mempool_bluestore_cache_data);
+      b.reassign_to_mempool(mempool::mempool_bluestore_cache_meta);
     } else {
       auto& b = o->onode.attrs[p->first.c_str()] = p->second;
-      b.reassign_to_mempool(mempool::mempool_bluestore_cache_data);
+      b.reassign_to_mempool(mempool::mempool_bluestore_cache_meta);
     }
   }
   txc->write_onode(o);
index d7c437b816a6b25059b3980fe5b4aa555e25f06f..8232801c2ea0011e826103876e532f1e52e4e8c6 100644 (file)
@@ -898,7 +898,7 @@ ostream& operator<<(ostream& out, const bluestore_shared_blob_t& o);
 struct bluestore_onode_t {
   uint64_t nid = 0;                    ///< numeric id (locally unique)
   uint64_t size = 0;                   ///< object size
-  // FIXME: bufferptr does not have a mempool
+  // mempool to be assigned to buffer::ptr manually
   std::map<mempool::bluestore_cache_meta::string, ceph::buffer::ptr> attrs;
 
   struct shard_info {