Main changes:
- remove bluefs_wal_header_t; we no longer use denc directly,
instead we read length and marker directly
- get rid of wal_limit; this is replaced with splitting
WAL_V2=>{WAL_V2,WAL_V2_FIN}. WAL_V2 means there could be more wal data,
WAL_V2_FIN means file was orderly closed = no more data.
- modified wal_marker_t (previously WALMarker) to be calculated in
endiness-agnostic way.
- replaced _wal_update_size with _wal_index_file; it does a similar
function, but is less convoluted now
- simplified _wal_read
- now BlueFS::close_writer() flushes data
- BlueRocksEnv's BlueRocksWritableFile::truncate() now does the action
- dout(20) << fmt::format("{} cannot read marker, most likely we are out of bounds. flush_offset={:#X}, marker_offset={:#X}", __func__, flush_offset, marker_offset) << dendl;
- break;
- }
- uint64_t marker;
- buffer_iterator = bl.cbegin();
- decode(marker, buffer_iterator);
- if (marker != File::WALFlush::generate_hashed_marker(super.osd_uuid, file->fnode.ino)) {
ceph::buffer::list::page_aligned_appender buffer_appender; //< for const char* only
- std::unique_ptr<bufferlist::contiguous_filler> wal_header_filler; // To encode bluefs_wal_header_t we need to save the location of the header we want to fill
- uint64_t wal_limit; // EOF of wal, this limit represents upper limit of fnode.size, not upper limit of wal_size
- uint64_t wal_size; // Amount of payload bytes in WAL(not including envelope data), there could be more on power off instances, in range of wal_size~wal_limit
+ uint64_t wal_size; // Amount of payload bytes in WAL(not including envelope data), there could be more on power off instances, in range of fnode.size~wal_limit