]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: commit osdmaps before exposing them to PGs
authorSage Weil <sage@redhat.com>
Mon, 14 Mar 2016 17:47:31 +0000 (13:47 -0400)
committerSage Weil <sage@redhat.com>
Thu, 17 Mar 2016 16:58:54 +0000 (12:58 -0400)
commitb839a06c1aba24ecf0780387a605192ff929f158
treeb4e8b6ca05bf3540f8386c5c5d0f323af897d741
parenta7fcab11e874530d724b5fbf7ed523b40b3328c6
osd: commit osdmaps before exposing them to PGs

handle_osd_map and the PGs use different sequencers when writing
their updates.  We therefore need to make sure new osdmaps are
committed to disk before we expose them to PGs, lest they update
their info to reference a new osdmap that hasn't actually
committed yet.

This doesn't happen with FileStore because transactions are
ordered when they are queued, but it does affect BlueStore.

Fix by splitting handle_osd_map into two phases, one that just
persists stuff, and the second half that publishes the new maps to
the rest of the OSD.

Fixes: #15073
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc
src/osd/OSD.h