]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
seastore: rename journal_type to journal_type_t
authormyoungwon oh <ohmyoungwon@gmail.com>
Thu, 12 May 2022 07:58:40 +0000 (16:58 +0900)
committermyoungwon oh <ohmyoungwon@gmail.com>
Thu, 19 May 2022 00:51:43 +0000 (09:51 +0900)
Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
src/crimson/os/seastore/journal.h
src/crimson/os/seastore/journal/circular_bounded_journal.h
src/crimson/os/seastore/journal/segmented_journal.h
src/crimson/os/seastore/transaction_manager.cc
src/crimson/os/seastore/transaction_manager.h
src/test/crimson/seastore/test_transaction_manager.cc
src/test/crimson/seastore/transaction_manager_test_state.h

index 9ee5e9e34be22c874d55f900c62f11c702362032..50568175e609282607c446f5d60c7cf0776b7f5b 100644 (file)
@@ -18,7 +18,7 @@ class NVMeBlockDevice;
 class SegmentManagerGroup;
 class SegmentProvider;
 
-enum class journal_type {
+enum class journal_type_t {
   SEGMENT_JOURNAL = 0,
   CIRCULARBOUNDED_JOURNAL
 };
@@ -93,7 +93,7 @@ public:
 
   virtual ~Journal() {}
 
-  virtual journal_type get_type() = 0;
+  virtual journal_type_t get_type() = 0;
 };
 using JournalRef = std::unique_ptr<Journal>;
 
index 141b467fe8fc92841f352a334e152575a19a52ff..1910571cfc3b4fb74d9c3f4bc4981d3f4282ef16 100644 (file)
@@ -86,8 +86,8 @@ public:
   open_for_write_ret open_device_read_header(rbm_abs_addr start);
   close_ertr::future<> close() final;
 
-  journal_type get_type() final {
-    return journal_type::CIRCULARBOUNDED_JOURNAL;
+  journal_type_t get_type() final {
+    return journal_type_t::CIRCULARBOUNDED_JOURNAL;
   }
 
   submit_record_ret submit_record(
index 558189b37433146d395a040075ae2da455b55b94..46c3675bdf1fd6ceb62695009babdad2c977c292 100644 (file)
@@ -43,8 +43,8 @@ public:
     write_pipeline = _write_pipeline;
   }
 
-  journal_type get_type() final {
-    return journal_type::SEGMENT_JOURNAL;
+  journal_type_t get_type() final {
+    return journal_type_t::SEGMENT_JOURNAL;
   }
 
 private:
index c21e5d27d584f78a02df2b456b92f8cdc688c98c..48d59c1078d0dafe878767b6537fbbc1b4dff30b 100644 (file)
@@ -649,7 +649,7 @@ TransactionManagerRef make_transaction_manager(tm_make_config_t config)
     *cache,
     config.detailed);
   JournalRef journal;
-  if (config.j_type == journal_type::SEGMENT_JOURNAL) {
+  if (config.j_type == journal_type_t::SEGMENT_JOURNAL) {
     journal = journal::make_segmented(*segment_cleaner);
   } else {
     journal = journal::make_circularbounded(
index 59f561888ab0367608b8e58a601cdd9db7cf99bf..f0e858b9f42ce5464b8e0fdb201037506f2a9ab0 100644 (file)
@@ -593,13 +593,13 @@ using TransactionManagerRef = std::unique_ptr<TransactionManager>;
 
 struct tm_make_config_t {
   bool detailed = true;
-  journal_type j_type = journal_type::SEGMENT_JOURNAL;
+  journal_type_t j_type = journal_type_t::SEGMENT_JOURNAL;
   placement_hint_t default_placement_hint =
     placement_hint_t::HOT;
   static tm_make_config_t get_default() {
     return tm_make_config_t {
       true,
-      journal_type::SEGMENT_JOURNAL,
+      journal_type_t::SEGMENT_JOURNAL,
       placement_hint_t::HOT
     };
   }
index 549ccaf4f17bd59f59644b853656c43c1cbd3512..649d681796f328ab30c038f1815a671285c561e3 100644 (file)
@@ -78,7 +78,7 @@ struct transaction_manager_test_t :
     if (j_type == "segmented") {
       return tm_setup(tm_config);
     } else if (j_type == "circularbounded") {
-      tm_config.j_type = journal_type::CIRCULARBOUNDED_JOURNAL;
+      tm_config.j_type = journal_type_t::CIRCULARBOUNDED_JOURNAL;
       tm_config.default_placement_hint = placement_hint_t::REWRITE;
       return tm_setup(tm_config);
     } else {
index 8f2934cf8b2efe91a1e792d0af057e661f20984a..823d7b8305e84e5f410372a06259e14d06c22842 100644 (file)
@@ -69,7 +69,7 @@ protected:
     for (auto &sec_sm : secondary_segment_managers) {
       sec_sm = segment_manager::create_test_ephemeral();
     }
-    if (tm_config.j_type == journal_type::CIRCULARBOUNDED_JOURNAL) {
+    if (tm_config.j_type == journal_type_t::CIRCULARBOUNDED_JOURNAL) {
       auto config =
        journal::CircularBoundedJournal::mkfs_config_t::get_default();
       rb_device.reset(new nvme_device::TestMemory(config.total_size));
@@ -155,7 +155,7 @@ protected:
   virtual void _init() override {
     tm = make_transaction_manager(tm_config);
     tm->add_device(segment_manager.get(), true);
-    if (tm_config.j_type == journal_type::CIRCULARBOUNDED_JOURNAL) {
+    if (tm_config.j_type == journal_type_t::CIRCULARBOUNDED_JOURNAL) {
       tm->add_device(rb_device.get(), false);
       static_cast<journal::CircularBoundedJournal*>(tm->get_journal())->
        add_device(rb_device.get());
@@ -198,7 +198,7 @@ protected:
   }
 
   virtual FuturizedStore::mkfs_ertr::future<> _mkfs() {
-    if (tm_config.j_type == journal_type::SEGMENT_JOURNAL) {
+    if (tm_config.j_type == journal_type_t::SEGMENT_JOURNAL) {
       return tm->mkfs(
       ).handle_error(
        crimson::ct_error::assert_all{"Error in mkfs"}