uint64_t last_seg = get_last_segment_offset();
uint64_t period = journaler->get_layout_period();
// start a new segment if there are none or if we reach end of last segment
- if (journaler->get_write_pos()/period != last_seg/period) {
+ if (le->get_type() == EVENT_SUBTREEMAP) {
+ // avoid infinite loop
+ } else if (journaler->get_write_pos()/period != last_seg/period) {
dout(10) << "submit_entry also starting new segment: last = " << last_seg
<< ", cur pos = " << journaler->get_write_pos() << dendl;
start_new_segment();
} else if (g_conf->mds_debug_subtrees &&
- le->get_type() != EVENT_SUBTREEMAP_TEST &&
- le->get_type() != EVENT_SUBTREEMAP) {
+ le->get_type() != EVENT_SUBTREEMAP_TEST) {
// debug: journal this every time to catch subtree replay bugs.
// use a different event id so it doesn't get interpreted as a
// LogSegment boundary on replay.