]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
seastore/cbjournal: rename open_for_write to open_device_read_header
authormyoungwon oh <ohmyoungwon@gmail.com>
Thu, 12 May 2022 02:18:59 +0000 (11:18 +0900)
committermyoungwon oh <ohmyoungwon@gmail.com>
Thu, 19 May 2022 00:49:40 +0000 (09:49 +0900)
Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
src/crimson/os/seastore/journal/circular_bounded_journal.cc
src/crimson/os/seastore/journal/circular_bounded_journal.h
src/test/crimson/seastore/test_cbjournal.cc

index a027b4f2ed6551b222c4dee27b5f6305a8192f76..3ad908dfe02163f48b98746ec41c713444b0a26c 100644 (file)
@@ -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()),
index 45c8107bb875510cd233c62aaba1c7b2a7b04a88..141b467fe8fc92841f352a334e152575a19a52ff 100644 (file)
@@ -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
index 191cc45ff5d9f5298c9772d70b343c5578f97b99..95379d701bf517ee61ef5f9160f5a22e1b16dfcf 100644 (file)
@@ -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();