From: Michal Jarzabek Date: Tue, 5 May 2015 18:36:28 +0000 (+0100) Subject: common/buffer.cc: change linkage of few variables to internal X-Git-Tag: v9.0.2~171^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=60be2d65e553566bbe7e6084072cc108f50a6655;p=ceph.git common/buffer.cc: change linkage of few variables to internal Signed-off-by: Michal Jarzabek --- diff --git a/src/common/buffer.cc b/src/common/buffer.cc index b62856f4540c..258880b011d4 100644 --- a/src/common/buffer.cc +++ b/src/common/buffer.cc @@ -45,8 +45,8 @@ static simple_spinlock_t buffer_debug_lock = SIMPLE_SPINLOCK_INITIALIZER; # define bendl std::endl; } #endif - atomic_t buffer_total_alloc; - bool buffer_track_alloc = get_env_bool("CEPH_BUFFER_TRACK"); + static atomic_t buffer_total_alloc; + const bool buffer_track_alloc = get_env_bool("CEPH_BUFFER_TRACK"); void buffer::inc_total_alloc(unsigned len) { if (buffer_track_alloc) @@ -60,9 +60,9 @@ static simple_spinlock_t buffer_debug_lock = SIMPLE_SPINLOCK_INITIALIZER; return buffer_total_alloc.read(); } - atomic_t buffer_cached_crc; - atomic_t buffer_cached_crc_adjusted; - bool buffer_track_crc = get_env_bool("CEPH_BUFFER_TRACK"); + static atomic_t buffer_cached_crc; + static atomic_t buffer_cached_crc_adjusted; + static bool buffer_track_crc = get_env_bool("CEPH_BUFFER_TRACK"); void buffer::track_cached_crc(bool b) { buffer_track_crc = b; @@ -74,8 +74,8 @@ static simple_spinlock_t buffer_debug_lock = SIMPLE_SPINLOCK_INITIALIZER; return buffer_cached_crc_adjusted.read(); } - atomic_t buffer_c_str_accesses; - bool buffer_track_c_str = get_env_bool("CEPH_BUFFER_TRACK"); + static atomic_t buffer_c_str_accesses; + static bool buffer_track_c_str = get_env_bool("CEPH_BUFFER_TRACK"); void buffer::track_c_str(bool b) { buffer_track_c_str = b; @@ -84,7 +84,7 @@ static simple_spinlock_t buffer_debug_lock = SIMPLE_SPINLOCK_INITIALIZER; return buffer_c_str_accesses.read(); } - atomic_t buffer_max_pipe_size; + static atomic_t buffer_max_pipe_size; int update_max_pipe_size() { #ifdef CEPH_HAVE_SETPIPE_SZ char buf[32];