From: Sage Weil Date: Tue, 11 Oct 2016 20:47:16 +0000 (-0400) Subject: include/mempool: rename containers -> types X-Git-Tag: v11.1.0~442^2~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=735be3662f5cc8ad6f46c4c1a6e1a9aa37077057;p=ceph.git include/mempool: rename containers -> types Signed-off-by: Sage Weil --- diff --git a/src/global/mempool.cc b/src/global/mempool.cc index ec96d7cca415..f5513d1fbab6 100644 --- a/src/global/mempool.cc +++ b/src/global/mempool.cc @@ -93,8 +93,8 @@ void mempool::pool_t::get_stats( total->bytes += shard[i].bytes; if (debug) { std::unique_lock shard_lock(shard[i].lock); - for (const list_member_t *p = shard[i].containers.next; - p != &shard[i].containers; + for (const list_member_t *p = shard[i].types.next; + p != &shard[i].types; p = p->next) { const pool_allocator_base_t *c = reinterpret_cast(p); diff --git a/src/include/mempool.h b/src/include/mempool.h index 74fdc1519303..8b4c07c70636 100644 --- a/src/include/mempool.h +++ b/src/include/mempool.h @@ -218,8 +218,8 @@ enum { num_shards = 64 }; struct shard_t { std::atomic bytes = {0}; std::atomic items = {0}; - mutable std::mutex lock; // only used for containers list - list_member_t containers; // protected by lock + mutable std::mutex lock; // only used for types list + list_member_t types; // protected by lock }; struct stats_t { @@ -234,7 +234,7 @@ struct stats_t { // Root of all allocators, this enables the container information to // operation easily. These fields are "always" accurate. struct pool_allocator_base_t { - list_member_t list_member; + list_member_t list_member; // this must come first; see get_stats() hackery pool_t *pool = nullptr; shard_t *shard = nullptr; @@ -302,7 +302,7 @@ inline void pool_allocator_base_t::attach_pool( // unconditionally register type, even if debug is currently off std::unique_lock lock(shard->lock); - shard->containers.insert(&list_member); + shard->types.insert(&list_member); } inline pool_allocator_base_t::~pool_allocator_base_t()