mirror of
https://github.com/ceph/ceph
synced 2025-01-03 01:22:53 +00:00
osd: fix build_incremental_map_msg
We keep both the inc and the full for our oldest osdmap. Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
This commit is contained in:
parent
5804477b20
commit
c9d0e556c7
@ -3648,18 +3648,18 @@ MOSDMap *OSD::build_incremental_map_msg(epoch_t since, epoch_t to)
|
||||
m->oldest_map = superblock.oldest_map;
|
||||
m->newest_map = superblock.newest_map;
|
||||
|
||||
for (epoch_t e = to;
|
||||
e > since;
|
||||
e--) {
|
||||
for (epoch_t e = to; e > since; e--) {
|
||||
bufferlist bl;
|
||||
if (get_inc_map_bl(e,bl)) {
|
||||
if (e > m->oldest_map && get_inc_map_bl(e, bl)) {
|
||||
m->incremental_maps[e].claim(bl);
|
||||
} else if (get_map_bl(e,bl)) {
|
||||
} else if (get_map_bl(e, bl)) {
|
||||
m->maps[e].claim(bl);
|
||||
break;
|
||||
}
|
||||
else {
|
||||
assert(0); // we should have all maps.
|
||||
} else {
|
||||
derr << "since " << since << " to " << to
|
||||
<< " oldest " << m->oldest_map << " newest " << m->newest_map
|
||||
<< dendl;
|
||||
assert(0 == "missing an osdmap on disk"); // we should have all maps.
|
||||
}
|
||||
}
|
||||
return m;
|
||||
|
Loading…
Reference in New Issue
Block a user