]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
OSD: OSDMapRef access by multiple threads is unsafe 26874/head
authorZengran Zhang <zhangzengran@sangfor.com.cn>
Sat, 9 Mar 2019 06:48:28 +0000 (14:48 +0800)
committerZengran Zhang <zhangzengran@sangfor.com.cn>
Wed, 3 Apr 2019 01:33:02 +0000 (09:33 +0800)
commit454c4cbae6b3363b80f52c7db5b6b7a5f3affd1a
treeb3ed1efc6783168fb06c048fe7be8c6493082602
parentd656ef08ae2788651f16a55147c75535da8f356b
OSD: OSDMapRef access by multiple threads is unsafe

we update OSD::osdmap in OSD::_committed_osd_maps() which is executed
by objectstore's finisher thread. while PG::sched_scrub() is called
by OSD's sharded work queue's worker thread.and we push the osdmap
updates down to PGs OSD::consume_map() which is in turn called by
OSD::_committed_osd_maps() where osdmap is updated. so it does not big
deal if we are checking a stale CEPH_OSDMAP_NODEEP_SCRUB flag.
also this flag will be updated with the latest osdmap very soon.

Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Zengran Zhang <zhangzengran@sangfor.com.cn>
src/osd/OSD.cc
src/osd/PG.cc