File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ SegmentedOolWriter::do_write(
8484 return do_write (t, extents);
8585 });
8686 }
87- record_t record (record_type_t ::JOURNAL , t.get_src ());
87+ record_t record (record_type_t ::OOL , t.get_src ());
8888 std::list<LogicalCachedExtentRef> pending_extents;
8989 auto commit_time = seastar::lowres_system_clock::now ();
9090
Original file line number Diff line number Diff line change @@ -571,6 +571,7 @@ ceph::bufferlist encode_records(
571571 const journal_seq_t & committed_to,
572572 segment_nonce_t current_segment_nonce)
573573{
574+ assert (record_group.size .record_type < record_type_t ::MAX);
574575 assert (record_group.size .block_size > 0 );
575576 assert (record_group.records .size () > 0 );
576577
@@ -582,6 +583,15 @@ ceph::bufferlist encode_records(
582583 }
583584 }
584585
586+ if (record_group.size .record_type == record_type_t ::OOL) {
587+ // OOL won't contain metadata
588+ assert (record_group.size .get_mdlength () == 0 );
589+ ceph_assert (data_bl.length () ==
590+ record_group.size .get_encoded_length ());
591+ record_group.clear ();
592+ return data_bl;
593+ }
594+ // JOURNAL
585595 bufferlist bl;
586596 record_group_header_t header{
587597 static_cast <extent_len_t >(record_group.records .size ()),
You can’t perform that action at this time.
0 commit comments