]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common/perf_counters: use second atomic to make counters safe to read 1811/head
authorSage Weil <sage@inktank.com>
Wed, 14 May 2014 15:58:07 +0000 (08:58 -0700)
committerSage Weil <sage@inktank.com>
Wed, 14 May 2014 15:58:07 +0000 (08:58 -0700)
commitc48a4ef96d181c39f4f7e4704f1926bba5069035
treebaeaac877d369d6517de655ce7c93b1776d64396
parent45281d9b64f19392d9d1505c2efe4e7975bebaa0
common/perf_counters: use second atomic to make counters safe to read

Add a second counter so that we can detect a race with an add/inc during
read, and retry.

Signed-off-by: Sage Weil <sage@inktank.com>
src/common/perf_counters.cc
src/common/perf_counters.h