]> 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)
committerSage Weil <sage@inktank.com>
Wed, 3 Jul 2013 22:24:20 +0000 (15:24 -0700)
commit01d3e094823d716be0b39e15323c2506c6f0cc3b
tree5ec979cfffa2bc127cf5dbb0baee0ac8b439b46c
parent3564e304e3f50642e4d9ff25e529d5fc60629093
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>
src/osd/OSD.cc