Otherwise, we may feed an offset past the end of the journal to
check_header in read_entry and incorrectly determine that the entry is
corrupt.
Fixes: 4296
Backport: bobtail
Backport: argonaut
Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit
5d54ab154ca790688a6a1a2ad5f869c17a23980a)
pos += len;
olen -= len;
}
+ if (pos >= header.max_size)
+ pos = pos + get_top() - header.max_size;
}
bool FileJournal::read_entry(bufferlist& bl, uint64_t& seq)