crimson/os/seastore/journal: send aligned buffer in initialize_segment

Signed-off-by: Samuel Just <sjust@redhat.com>
This commit is contained in:
Samuel Just 2020-10-30 17:03:04 -07:00
parent 73e74914b5
commit d7bb905a93

View File

@ -54,6 +54,15 @@ Journal::initialize_segment(Segment &segment)
segment_provider->get_journal_tail_target()};
::encode(header, bl);
bufferptr bp(
ceph::buffer::create_page_aligned(
segment_manager.get_block_size()));
bp.zero();
auto iter = bl.cbegin();
iter.copy(bl.length(), bp.c_str());
bl.clear();
bl.append(bp);
written_to = segment_manager.get_block_size();
return segment.write(0, bl).safe_then(
[=] {