Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nautilus: osd: OSDMapRef access by multiple threads is unsafe #27402

Merged
merged 1 commit into from Apr 10, 2019

Conversation

liewegas
Copy link
Member

@liewegas liewegas commented Apr 5, 2019

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
(cherry picked from commit 454c4cb)

  • trivial conflict from adjacent code in OSDService::shutdown()

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>
(cherry picked from commit 454c4cb)

# Conflicts:
#	src/osd/OSD.cc
 - trivial conflict from adjacent code in OSDService::shutdown()
@liewegas liewegas added this to the nautilus milestone Apr 5, 2019
@liewegas liewegas requested a review from tchaikov April 5, 2019 14:00
@liewegas liewegas merged commit ed6bc9f into ceph:nautilus Apr 10, 2019
liewegas added a commit that referenced this pull request Apr 10, 2019
* refs/pull/27402/head:
	OSD: OSDMapRef access by multiple threads is unsafe

Reviewed-by: Kefu Chai <kchai@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants