]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: fix race when queuing recovery ops
authorSage Weil <sage@inktank.com>
Tue, 25 Jun 2013 20:16:45 +0000 (13:16 -0700)
committerSamuel Just <sam.just@inktank.com>
Tue, 13 Aug 2013 20:31:41 +0000 (13:31 -0700)
commit1ea6b56170fc9e223e7c30635db02fa2ad8f4b4e
treeb08e8048ce0f9e3505335a3f7639677e8b9682dc
parent4433f9ad8b338b6a55e205602434b307287bfaa3
osd: fix race when queuing recovery ops

Previously we would sample how many ops to start under the lock, drop it,
and start that many.  This is racy because multiple threads can jump in
and we start too many ops.  Instead, claim as many slots as we can and
release them back later if we do not end up using them.

Take care to re-wake the work-queue since we are releasing more resources
for wq use.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 01d3e094823d716be0b39e15323c2506c6f0cc3b)
src/osd/OSD.cc