]> git-server-git.apps.pok.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)
committerSage Weil <sage@inktank.com>
Tue, 25 Jun 2013 00:44:06 +0000 (17:44 -0700)
commit3791a1e55828ba541f9d3e8e3df0da8e79c375f9
treec61f3b0f3e6e1a16eab3087562dae97ce2a0584e
parent9a9c941d8d9e311d1642f7a93813a4c43c5707ee
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>
src/osd/OSD.cc