From 459159626efc5fbc788eddf141f94e825c75beb0 Mon Sep 17 00:00:00 2001 From: myoungwon oh Date: Thu, 12 May 2022 11:18:59 +0900 Subject: [PATCH] seastore/cbjournal: rename open_for_write to open_device_read_header Signed-off-by: Myoungwon Oh --- src/crimson/os/seastore/journal/circular_bounded_journal.cc | 6 +++--- src/crimson/os/seastore/journal/circular_bounded_journal.h | 6 +++--- src/test/crimson/seastore/test_cbjournal.cc | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/crimson/os/seastore/journal/circular_bounded_journal.cc b/src/crimson/os/seastore/journal/circular_bounded_journal.cc index a027b4f2ed6..3ad908dfe02 100644 --- a/src/crimson/os/seastore/journal/circular_bounded_journal.cc +++ b/src/crimson/os/seastore/journal/circular_bounded_journal.cc @@ -94,7 +94,7 @@ ceph::bufferlist CircularBoundedJournal::encode_header() 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() @@ -112,7 +112,7 @@ 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) { @@ -338,7 +338,7 @@ Journal::replay_ret CircularBoundedJournal::replay( * 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()), diff --git a/src/crimson/os/seastore/journal/circular_bounded_journal.h b/src/crimson/os/seastore/journal/circular_bounded_journal.h index 45c8107bb87..141b467fe8f 100644 --- a/src/crimson/os/seastore/journal/circular_bounded_journal.h +++ b/src/crimson/os/seastore/journal/circular_bounded_journal.h @@ -83,7 +83,7 @@ public: ~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 { @@ -306,8 +306,8 @@ private: /** * 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 diff --git a/src/test/crimson/seastore/test_cbjournal.cc b/src/test/crimson/seastore/test_cbjournal.cc index 191cc45ff5d..95379d701bf 100644 --- a/src/test/crimson/seastore/test_cbjournal.cc +++ b/src/test/crimson/seastore/test_cbjournal.cc @@ -234,7 +234,7 @@ struct cbjournal_test_t : public seastar_test_suite_t 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(); -- 2.39.5