CircularBoundedJournal::open_for_write_ret CircularBoundedJournal::open_for_write()
{
- return open_for_write(CBJOURNAL_START_ADDRESS);
+ return open_device_read_header(CBJOURNAL_START_ADDRESS);
}
CircularBoundedJournal::close_ertr::future<> CircularBoundedJournal::close()
}
CircularBoundedJournal::open_for_write_ret
-CircularBoundedJournal::open_for_write(rbm_abs_addr start)
+CircularBoundedJournal::open_device_read_header(rbm_abs_addr start)
{
LOG_PREFIX(CircularBoundedJournal::open_for_write);
if (init) {
* read records from last applied record prior to written_to, and replay
*/
LOG_PREFIX(CircularBoundedJournal::replay);
- auto fut = open_for_write(CBJOURNAL_START_ADDRESS);
+ auto fut = open_device_read_header(CBJOURNAL_START_ADDRESS);
return fut.safe_then([this, FNAME, delta_handler=std::move(delta_handler)] (auto addr) {
return seastar::do_with(
rbm_abs_addr(get_journal_tail()),
~CircularBoundedJournal() {}
open_for_write_ret open_for_write() final;
- open_for_write_ret open_for_write(rbm_abs_addr start);
+ open_for_write_ret open_device_read_header(rbm_abs_addr start);
close_ertr::future<> close() final;
journal_type get_type() final {
/**
* initialized
*
- * true after open_read_header, set to false in close(). Indicates that device is open
- * and in-memory header is valid.
+ * true after open_device_read_header, set to false in close().
+ * Indicates that device is open and in-memory header is valid.
*/
bool init = false;
segment_seq_t cur_segment_seq = 0; // segment seq to track the sequence to written records
return cbj->mkfs(config).unsafe_get0();
}
auto open() {
- return cbj->open_for_write(config.start).unsafe_get0();
+ return cbj->open_device_read_header(config.start).unsafe_get0();
}
auto get_available_size() {
return cbj->get_available_size();