]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd: tolerate racing threads starting recovery ops
authorSage Weil <sage@inktank.com>
Mon, 24 Jun 2013 23:37:29 +0000 (16:37 -0700)
committerSamuel Just <sam.just@inktank.com>
Tue, 13 Aug 2013 20:31:38 +0000 (13:31 -0700)
commit4433f9ad8b338b6a55e205602434b307287bfaa3
tree2e83e8e9e4f8ac418d9192d30d4445a92e0a76ff
parent0964d53ef3e8e386e0a1635d2240aefad7b8e2c1
osd: tolerate racing threads starting recovery ops

We sample the (max - active) recovery ops to know how many to start, but
do not hold the lock over the full duration, such that it is possible to
start too many ops.  This isn't problematic except that our condition
checks for being == max but not beyond it, and we will continue to start
recovery ops when we shouldn't.  Fix this by adjusting the conditional
to be <=.

Reported-by: Stefan Priebe <s.priebe@profihost.ag>
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 3791a1e55828ba541f9d3e8e3df0da8e79c375f9)
src/osd/OSD.cc