From 02cf1816bcf26e5fd1faa73a60743a90c0a5340e Mon Sep 17 00:00:00 2001 From: Xiubo Li Date: Thu, 17 Jun 2021 19:20:29 +0800 Subject: [PATCH] os/memstore: make the used_bytes to atomic Fixes: https://tracker.ceph.com/issues/51092 Signed-off-by: Xiubo Li --- src/os/memstore/MemStore.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/os/memstore/MemStore.h b/src/os/memstore/MemStore.h index 92304a4507be5..7f0f58e423cdf 100644 --- a/src/os/memstore/MemStore.h +++ b/src/os/memstore/MemStore.h @@ -16,6 +16,7 @@ #ifndef CEPH_MEMSTORE_H #define CEPH_MEMSTORE_H +#include #include #include @@ -195,7 +196,7 @@ private: Finisher finisher; - uint64_t used_bytes; + std::atomic used_bytes; void _do_transaction(Transaction& t); -- 2.47.3