-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce new, better performing IoRingLogDevice2. (#155)
* Add IoRingLogDevice2 files. * Upgrade to batteries/0.53.0. * Refactor IoRingLogDevice benchmark test into cpp/hpp. * Add RawBlockFileImpl and async_write_some to log device storage. * Add SlotRangePriority for sorting SlotRanges in a max-heap. * Add IoRingLogDevice2 configs to storage context/file. * Only update control block with known commit pos values for flush pos. * Add comments; remove dead code devoted to flush_pos recovery. * CR feedback (everything but write handler changes) * Rest of CR changes. * Resolve last CR thread by fixing doxygen comments.
- Loading branch information
1 parent
c930fc8
commit 8d4ca66
Showing
39 changed files
with
3,225 additions
and
346 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
//#=##=##=#==#=#==#===#+==#+==========+==+=+=+=+=+=++=+++=+++++=-++++=-+++++++++++ | ||
// | ||
// Part of the LLFS Project, under Apache License v2.0. | ||
// See https://www.apache.org/licenses/LICENSE-2.0 for license information. | ||
// SPDX short identifier: Apache-2.0 | ||
// | ||
//+++++++++++-+-+--+----- --- -- - - - - | ||
|
||
#include <llfs/ioring_log_config2.hpp> | ||
// | ||
|
||
#include <llfs/log_device_config2.hpp> | ||
|
||
namespace llfs { | ||
|
||
//==#==========+==+=+=++=+++++++++++-+-+--+----- --- -- - - - - | ||
// | ||
/*static*/ IoRingLogConfig2 IoRingLogConfig2::from_packed( | ||
const FileOffsetPtr<const PackedLogDeviceConfig2&>& packed_config) | ||
{ | ||
return IoRingLogConfig2{ | ||
.control_block_offset = | ||
packed_config.absolute_from_relative_offset(packed_config->control_block_offset), | ||
.log_capacity = packed_config->logical_size, | ||
.device_page_size_log2 = packed_config->device_page_size_log2, | ||
.data_alignment_log2 = packed_config->data_alignment_log2, | ||
}; | ||
} | ||
|
||
} //namespace llfs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
//#=##=##=#==#=#==#===#+==#+==========+==+=+=+=+=+=++=+++=+++++=-++++=-+++++++++++ | ||
// | ||
// Part of the LLFS Project, under Apache License v2.0. | ||
// See https://www.apache.org/licenses/LICENSE-2.0 for license information. | ||
// SPDX short identifier: Apache-2.0 | ||
// | ||
//+++++++++++-+-+--+----- --- -- - - - - | ||
|
||
#pragma once | ||
#ifndef LLFS_IORING_LOG_CONFIG2_HPP | ||
#define LLFS_IORING_LOG_CONFIG2_HPP | ||
|
||
#include <llfs/config.hpp> | ||
// | ||
|
||
#include <llfs/file_offset_ptr.hpp> | ||
#include <llfs/int_types.hpp> | ||
#include <llfs/ioring_log_config2.hpp> | ||
|
||
namespace llfs { | ||
|
||
struct PackedLogDeviceConfig2; | ||
|
||
struct IoRingLogConfig2 { | ||
static IoRingLogConfig2 from_packed( | ||
const FileOffsetPtr<const PackedLogDeviceConfig2&>& packed_config); | ||
|
||
//+++++++++++-+-+--+----- --- -- - - - - | ||
|
||
i64 control_block_offset; | ||
u64 log_capacity; | ||
u16 device_page_size_log2; | ||
u16 data_alignment_log2; | ||
|
||
//+++++++++++-+-+--+----- --- -- - - - - | ||
|
||
i64 control_block_size() const noexcept | ||
{ | ||
return i64{1} << this->data_alignment_log2; | ||
} | ||
}; | ||
|
||
} //namespace llfs | ||
|
||
#endif // LLFS_IORING_LOG_CONFIG2_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.