The first get_map() call needs to be avoided when stop < last_epoch. This
fixes a crash like
2011-11-08 21:51:09.046739
7fcf6e035700 osd.0 5 pg[1.1p0( empty n=0 ec=1 les/c 3/3 2/2/2) [0,1] r=0 mlcod 0'0 !hml peering] enter Started/Primary/Peering/GetInfo
2011-11-08 21:51:09.046767
7fcf6e035700 osd.0 5 pg[1.1p0( empty n=0 ec=1 les/c 3/3 2/2/2) [0,1] r=0 mlcod 0'0 !hml peering] generate_past_intervals over epochs 4-1
2011-11-08 21:51:09.046796
7fcf6e035700 osd.0 5 get_map 1 - loading and decoding 0x183b000
*** Caught signal (Aborted) **
in thread
7fcf6e035700
ceph version
0.37-327-g1bc1a24 (commit:
1bc1a244dbf7342662322d002d0c9d41ad5fee6f)
...
Signed-off-by: Sage Weil <sage@newdream.net>
if (stop < osd->superblock.oldest_map)
stop = osd->superblock.oldest_map; // this is a lower bound on last_epoch_clean cluster-wide.
epoch_t last_epoch = info.history.same_interval_since - 1;
+
+ if (last_epoch < stop) {
+ dout(10) << __func__ << " last_epoch " << last_epoch << " < oldest " << stop
+ << ", nothing to do" << dendl;
+ return;
+ }
+
dout(10) << __func__ << " over epochs " << stop << "-" << last_epoch << dendl;
OSDMap *nextmap = osd->get_map(last_epoch);