]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
common/WorkQueue: fix a race avoiding drain endless. 17659/head
authorJianpeng Ma <jianpeng.ma@intel.com>
Mon, 6 Nov 2017 13:40:12 +0000 (21:40 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Mon, 6 Nov 2017 13:40:12 +0000 (21:40 +0800)
commitf533dda42f86b2bae75e7c3d1a7754d8727d049c
tree46f77457a36df73f1214a8adff1b7cb6e3292641
parentfb6eca1fb25c90ceb16ca5400355f81b0498c285
common/WorkQueue: fix a race avoiding drain endless.

In function ShardedThreadPool::shardedthreadpool_worker, when call
_proces, it don't get shardedpool_lock. So there is a race between
return_waiting_threads and _proces. If return_waiting_threads first run
and _process will lost this signal and wait until.
This may cause ShardedThreadPool::drain can't complete.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/common/WorkQueue.cc
src/common/WorkQueue.h
src/osd/OSD.cc
src/osd/OSD.h