]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd: OSDMap: build reverse name->pool map upon decoding 1095/head
authorJoao Eduardo Luis <jecluis@gmail.com>
Thu, 16 Jan 2014 12:51:32 +0000 (12:51 +0000)
committerJoao Eduardo Luis <jecluis@gmail.com>
Thu, 16 Jan 2014 12:51:32 +0000 (12:51 +0000)
commit1aa2601818cef481ed68c350f98c7e1fca911b97
tree0dfeac2dd1969229e44d7f68fe49431a16c19142
parent3b696f28d6cee1fd3a2b78911cc8377445158ba1
osd: OSDMap: build reverse name->pool map upon decoding

Commit 3d7c69fb09 introduced a new OSDMap encoding/decoding scheme.
However, while the classic decoding function still kept building the
reverse name->pool map, the new decoding function did not, causing the
monitor to be unable to map pool names to pool ids.

This patch fixes this, by factoring out the loop responsible for
populating the 'name_pool' map, as well as calling 'calc_num_osds()', to
OSDMap::post_decode() and having this function called from both the
classic and the new decode functions.

Fixes: 7166
Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
src/osd/OSDMap.cc
src/osd/OSDMap.h