mirror of
https://github.com/ceph/ceph
synced 2025-03-25 11:48:05 +00:00
mds: fix error reformatting subtreemap_test events
Rare outside of vstart clusters, but if someone did ever have one of these events in their journal and try to update to latest ceph, they would end up with bogus expire_pos on the reformatted events. Signed-off-by: John Spray <john.spray@redhat.com>
This commit is contained in:
parent
557df13b32
commit
efdaa930d2
@ -1100,9 +1100,11 @@ void MDLog::_reformat_journal(JournalPointer const &jp_in, Journaler *old_journa
|
||||
|
||||
// Zero-out expire_pos in subtreemap because offsets have changed
|
||||
// (expire_pos is just an optimization so it's safe to eliminate it)
|
||||
if (le->get_type() == EVENT_SUBTREEMAP) {
|
||||
dout(20) << __func__ << " zeroing expire_pos in subtreemap event at " << le_pos << dendl;
|
||||
if (le->get_type() == EVENT_SUBTREEMAP
|
||||
|| le->get_type() == EVENT_SUBTREEMAP_TEST) {
|
||||
ESubtreeMap *sle = dynamic_cast<ESubtreeMap*>(le);
|
||||
dout(20) << __func__ << " zeroing expire_pos in subtreemap event at "
|
||||
<< le_pos << " seq=" << sle->event_seq << dendl;
|
||||
assert(sle != NULL);
|
||||
sle->expire_pos = 0;
|
||||
modified = true;
|
||||
|
Loading…
Reference in New Issue
Block a user