mirror of
https://github.com/ceph/ceph
synced 2025-04-01 23:02:17 +00:00
Merge pull request #33034 from rzarzynski/wip-include-ceph_atomic_in_mempool
include: switch mempool.h to ceph::atomic. Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
commit
0af38ea25b
src
@ -22,12 +22,12 @@
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <mutex>
|
||||
#include <atomic>
|
||||
#include <typeinfo>
|
||||
#include <boost/container/flat_set.hpp>
|
||||
#include <boost/container/flat_map.hpp>
|
||||
|
||||
#include <common/Formatter.h>
|
||||
#include "common/Formatter.h"
|
||||
#include "common/ceph_atomic.h"
|
||||
#include "include/ceph_assert.h"
|
||||
#include "include/compact_map.h"
|
||||
#include "include/compact_set.h"
|
||||
@ -194,9 +194,9 @@ enum {
|
||||
|
||||
// align shard to a cacheline
|
||||
struct shard_t {
|
||||
std::atomic<size_t> bytes = {0};
|
||||
std::atomic<size_t> items = {0};
|
||||
char __padding[128 - sizeof(std::atomic<size_t>)*2];
|
||||
ceph::atomic<size_t> bytes = {0};
|
||||
ceph::atomic<size_t> items = {0};
|
||||
char __padding[128 - sizeof(ceph::atomic<size_t>)*2];
|
||||
} __attribute__ ((aligned (128)));
|
||||
|
||||
static_assert(sizeof(shard_t) == 128, "shard_t should be cacheline-sized");
|
||||
@ -222,7 +222,7 @@ const char *get_pool_name(pool_index_t ix);
|
||||
struct type_t {
|
||||
const char *type_name;
|
||||
size_t item_size;
|
||||
std::atomic<ssize_t> items = {0}; // signed
|
||||
ceph::atomic<ssize_t> items = {0}; // signed
|
||||
};
|
||||
|
||||
struct type_info_hash {
|
||||
|
@ -1455,7 +1455,7 @@ public:
|
||||
set<pg_shard_t> might_have_unfound;
|
||||
|
||||
bool deleting = false; /// true while in removing or OSD is shutting down
|
||||
atomic<bool> deleted = {false}; /// true once deletion complete
|
||||
std::atomic<bool> deleted = {false}; /// true once deletion complete
|
||||
|
||||
MissingLoc missing_loc; ///< information about missing objects
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user