]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/seastore: avoid using 'final' to mean 'override' 68201/head
authorRonen Friedman <rfriedma@redhat.com>
Fri, 3 Apr 2026 11:25:20 +0000 (11:25 +0000)
committerRonen Friedman <rfriedma@redhat.com>
Sun, 5 Apr 2026 11:49:13 +0000 (11:49 +0000)
Note: when using 'final', the compiler *does not*
check that the function is actually overriding a base
class function.

Using only 'override' wherever the class itself is
already marked 'final', 'override final' otherwise.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/crimson/os/alienstore/alien_store.h
src/crimson/os/cyanstore/cyan_store.h
src/crimson/os/seastore/onode_manager/staged-fltree/node_extent_manager/seastore.h
src/crimson/os/seastore/random_block_manager/block_rb_manager.h
src/crimson/os/seastore/seastore.h
src/crimson/os/seastore/segment_manager/block.h
src/crimson/os/seastore/segment_manager/ephemeral.h
src/crimson/os/seastore/segment_manager/zbd.h

index e712ce74d4e3e0755437f8b1a0539b64cfb10e71..b0e17cac52485d2ec8b4b881308676ddad986b64 100644 (file)
@@ -27,50 +27,50 @@ public:
   AlienStore(const std::string& type,
              const std::string& path,
              const ConfigValues& values);
-  ~AlienStore() final;
+  ~AlienStore() override;
 
-  seastar::future<uint32_t> start() final;
-  seastar::future<> stop() final;
-  mount_ertr::future<> mount() final;
-  seastar::future<> umount() final;
+  seastar::future<uint32_t> start() override;
+  seastar::future<> stop() override;
+  mount_ertr::future<> mount() override;
+  seastar::future<> umount() override;
 
   base_errorator::future<bool> exists(
     CollectionRef c,
     const ghobject_t& oid,
-    uint32_t op_flags = 0) final;
-  mkfs_ertr::future<> mkfs(uuid_d new_osd_fsid) final;
+    uint32_t op_flags = 0) override;
+  mkfs_ertr::future<> mkfs(uuid_d new_osd_fsid) override;
   read_errorator::future<ceph::bufferlist> read(CollectionRef c,
                                    const ghobject_t& oid,
                                    uint64_t offset,
                                    size_t len,
-                                   uint32_t op_flags = 0) final;
+                                   uint32_t op_flags = 0) override;
   read_errorator::future<ceph::bufferlist> readv(CollectionRef c,
                                                 const ghobject_t& oid,
                                                 interval_set<uint64_t>& m,
-                                                uint32_t op_flags = 0) final;
+                                                uint32_t op_flags = 0) override;
 
   get_attr_errorator::future<ceph::bufferlist> get_attr(
     CollectionRef c,
     const ghobject_t& oid,
     std::string_view name,
-    uint32_t op_flags = 0) const final;
+    uint32_t op_flags = 0) const override;
   get_attrs_ertr::future<attrs_t> get_attrs(
     CollectionRef c,
     const ghobject_t& oid,
-    uint32_t op_flags = 0) final;
+    uint32_t op_flags = 0) override;
 
   read_errorator::future<omap_values_t> omap_get_values(
     CollectionRef c,
     const ghobject_t& oid,
     const omap_keys_t& keys,
-    uint32_t op_flags = 0) final;
+    uint32_t op_flags = 0) override;
 
   seastar::future<std::tuple<std::vector<ghobject_t>, ghobject_t>> list_objects(
     CollectionRef c,
     const ghobject_t& start,
     const ghobject_t& end,
     uint64_t limit,
-    uint32_t op_flags = 0) const final;
+    uint32_t op_flags = 0) const override;
 
   read_errorator::future<ObjectStore::omap_iter_ret_t> omap_iterate(
     CollectionRef c,
@@ -78,51 +78,51 @@ public:
     ObjectStore::omap_iter_seek_t start_from,
     omap_iterate_cb_t callback,
     uint32_t op_flags = 0,
-    omap_iterate_conf_t on_conflict = nullptr) final;
+    omap_iterate_conf_t on_conflict = nullptr) override;
 
-  seastar::future<CollectionRef> create_new_collection(const coll_t& cid) final;
-  seastar::future<CollectionRef> open_collection(const coll_t& cid) final;
-  seastar::future<std::vector<coll_core_t>> list_collections() final;
+  seastar::future<CollectionRef> create_new_collection(const coll_t& cid) override;
+  seastar::future<CollectionRef> open_collection(const coll_t& cid) override;
+  seastar::future<std::vector<coll_core_t>> list_collections() override;
   seastar::future<> set_collection_opts(CollectionRef c,
-                                        const pool_opts_t& opts) final;
+                                        const pool_opts_t& opts) override;
 
   seastar::future<> do_transaction_no_callbacks(
     CollectionRef c,
-    ceph::os::Transaction&& txn) final;
+    ceph::os::Transaction&& txn) override;
 
   // error injection
-  seastar::future<> inject_data_error(const ghobject_t& o) final;
-  seastar::future<> inject_mdata_error(const ghobject_t& o) final;
+  seastar::future<> inject_data_error(const ghobject_t& o) override;
+  seastar::future<> inject_mdata_error(const ghobject_t& o) override;
 
   seastar::future<> write_meta(const std::string& key,
-                  const std::string& value) final;
+                  const std::string& value) override;
   seastar::future<std::tuple<int, std::string>> read_meta(
-    const std::string& key) final;
-  uuid_d get_fsid() const final;
-  seastar::future<store_statfs_t> stat() const final;
-  seastar::future<store_statfs_t> pool_statfs(int64_t pool_id) const final;
-  unsigned get_max_attr_name_length() const final;
+    const std::string& key) override;
+  uuid_d get_fsid() const override;
+  seastar::future<store_statfs_t> stat() const override;
+  seastar::future<store_statfs_t> pool_statfs(int64_t pool_id) const override;
+  unsigned get_max_attr_name_length() const override;
   seastar::future<struct stat> stat(
     CollectionRef,
     const ghobject_t&,
-    uint32_t op_flags = 0) final;
+    uint32_t op_flags = 0) override;
   seastar::future<std::string> get_default_device_class() final;
   get_attr_errorator::future<ceph::bufferlist> omap_get_header(
     CollectionRef,
     const ghobject_t&,
-    uint32_t) final;
+    uint32_t) override;
   read_errorator::future<std::map<uint64_t, uint64_t>> fiemap(
     CollectionRef,
     const ghobject_t&,
     uint64_t off,
     uint64_t len,
-    uint32_t op_flags) final;
+    uint32_t op_flags) override;
 
-  BackendStore get_backend_store(store_index_t store_index) final {
+  BackendStore get_backend_store(store_index_t store_index) override {
     return BackendStore(*this, GLOBAL_STORE, store_index);
   }
 
-  FuturizedStore::Shard& get_sharded_store(store_index_t store_index = 0) final {
+  FuturizedStore::Shard& get_sharded_store(store_index_t store_index = 0) override {
     return *this;
   }
 
index 53ea2576638b4ea1a47ce996bb1f41bf1181d73c..06e1b9fb77cacf72b73432e833a3b52815b5844a 100644 (file)
@@ -37,42 +37,42 @@ public:
     seastar::future<struct stat> stat(
       CollectionRef c,
       const ghobject_t& oid,
-      uint32_t op_flags = 0) final;
+      uint32_t op_flags = 0) override final;
 
     base_errorator::future<bool> exists(
       CollectionRef ch,
       const ghobject_t& oid,
-      uint32_t op_flags = 0) final;
+      uint32_t op_flags = 0) override final;
 
     read_errorator::future<ceph::bufferlist> read(
       CollectionRef c,
       const ghobject_t& oid,
       uint64_t offset,
       size_t len,
-      uint32_t op_flags = 0) final;
+      uint32_t op_flags = 0) override final;
 
     read_errorator::future<ceph::bufferlist> readv(
       CollectionRef c,
       const ghobject_t& oid,
       interval_set<uint64_t>& m,
-      uint32_t op_flags = 0) final;
+      uint32_t op_flags = 0) override final;
 
     get_attr_errorator::future<ceph::bufferlist> get_attr(
       CollectionRef c,
       const ghobject_t& oid,
       std::string_view name,
-      uint32_t op_flags = 0) const final;
+      uint32_t op_flags = 0) const override final;
 
     get_attrs_ertr::future<attrs_t> get_attrs(
       CollectionRef c,
       const ghobject_t& oid,
-      uint32_t op_flags = 0) final;
+      uint32_t op_flags = 0) override final;
 
     read_errorator::future<omap_values_t> omap_get_values(
       CollectionRef c,
       const ghobject_t& oid,
       const omap_keys_t& keys,
-      uint32_t op_flags = 0) final;
+      uint32_t op_flags = 0) override final;
 
     read_errorator::future<ObjectStore::omap_iter_ret_t> omap_iterate(
       CollectionRef c,
@@ -81,12 +81,12 @@ public:
       omap_iterate_cb_t callback,
       uint32_t op_flags = 0,
       omap_iterate_conf_t on_conflict = nullptr
-    ) final;
+    ) override final;
 
     get_attr_errorator::future<ceph::bufferlist> omap_get_header(
       CollectionRef c,
       const ghobject_t& oid,
-      uint32_t op_flags = 0) final;
+      uint32_t op_flags = 0) override final;
 
     seastar::future<std::tuple<std::vector<ghobject_t>, ghobject_t>>
     list_objects(
@@ -94,19 +94,19 @@ public:
       const ghobject_t& start,
       const ghobject_t& end,
       uint64_t limit,
-      uint32_t op_flags = 0) const final;
+      uint32_t op_flags = 0) const override final;
 
-    seastar::future<CollectionRef> create_new_collection(const coll_t& cid) final;
+    seastar::future<CollectionRef> create_new_collection(const coll_t& cid) override final;
 
-    seastar::future<CollectionRef> open_collection(const coll_t& cid) final;
+    seastar::future<CollectionRef> open_collection(const coll_t& cid) override final;
 
     seastar::future<> set_collection_opts(
       CollectionRef c,
-      const pool_opts_t& opts) final;
+      const pool_opts_t& opts) override final;
 
     seastar::future<> do_transaction_no_callbacks(
       CollectionRef ch,
-      ceph::os::Transaction&& txn) final;
+      ceph::os::Transaction&& txn) override final;
 
     read_errorator::future<std::map<uint64_t, uint64_t>>
     fiemap(
@@ -114,9 +114,9 @@ public:
       const ghobject_t& oid,
       uint64_t off,
       uint64_t len,
-      uint32_t op_flags) final;
+      uint32_t op_flags) override final;
 
-    unsigned get_max_attr_name_length() const final;
+    unsigned get_max_attr_name_length() const override final;
 
   public:
     // only exposed to CyanStore
@@ -195,28 +195,28 @@ public:
   };
 
   CyanStore(const std::string& path);
-  ~CyanStore() final;
+  ~CyanStore() override;
 
-  seastar::future<uint32_t> start() final;
+  seastar::future<uint32_t> start() override;
 
-  seastar::future<> stop() final;
+  seastar::future<> stop() override;
 
-  mount_ertr::future<> mount() final;
+  mount_ertr::future<> mount() override;
 
-  seastar::future<> umount() final;
+  seastar::future<> umount() override;
 
-  mkfs_ertr::future<> mkfs(uuid_d new_osd_fsid) final;
+  mkfs_ertr::future<> mkfs(uuid_d new_osd_fsid) override;
 
-  seastar::future<store_statfs_t> stat() const final;
+  seastar::future<store_statfs_t> stat() const override;
 
-  seastar::future<store_statfs_t> pool_statfs(int64_t pool_id) const final;
+  seastar::future<store_statfs_t> pool_statfs(int64_t pool_id) const override;
 
-  uuid_d get_fsid() const final;
+  uuid_d get_fsid() const override;
 
   seastar::future<> write_meta(const std::string& key,
-                 const std::string& value) final;
+                 const std::string& value) override;
 
-  BackendStore get_backend_store(store_index_t store_index) final {
+  BackendStore get_backend_store(store_index_t store_index) override {
     assert(!shard_stores.local().mshard_stores.empty());
     if (store_index != NULL_STORE_INDEX) {
       assert(store_index < shard_stores.local().mshard_stores.size());
@@ -230,7 +230,7 @@ public:
     }
   }
 
-  FuturizedStore::Shard& get_sharded_store(store_index_t store_index = 0) final
+  FuturizedStore::Shard& get_sharded_store(store_index_t store_index = 0) override
   {
     assert(store_index < shard_stores.local().mshard_stores.size());
     auto &shard_store = *(shard_stores.local().mshard_stores[store_index]);
@@ -239,11 +239,11 @@ public:
   }
 
   seastar::future<std::tuple<int, std::string>>
-  read_meta(const std::string& key) final;
+  read_meta(const std::string& key) override;
 
-  seastar::future<std::vector<coll_core_t>> list_collections() final;
+  seastar::future<std::vector<coll_core_t>> list_collections() override;
 
-  seastar::future<std::string> get_default_device_class() final;
+  seastar::future<std::string> get_default_device_class() override;
 
   seastar::future<> get_shard_nums();
 
index 715b0b2ebe6d56c64c5ec682d1870bd69f8e2127..dc5799382ba779a7b8446559e64ca872547970f6 100644 (file)
@@ -57,7 +57,7 @@ class SeastoreNodeExtent final: public NodeExtent {
  protected:
   NodeExtentRef mutate(context_t, DeltaRecorderURef&&) override;
 
-  void do_on_state_commit() final {
+  void do_on_state_commit() override {
     auto &prior = static_cast<SeastoreNodeExtent&>(*get_prior_instance());
     prior.recorder = std::move(recorder);
   }
index 553af02eed9caa12e83ff936937abfee8b06fd29..46d2ce88aa50ee4603eb5ba67aba93cfb7e9708f 100644 (file)
@@ -42,10 +42,10 @@ public:
    * ---------------------------------------------------------------------------
    */
 
-  read_ertr::future<> read(paddr_t addr, bufferptr &buffer) final;
-  write_ertr::future<> write(paddr_t addr, bufferptr buf) final;
-  open_ertr::future<> open() final;
-  close_ertr::future<> close() final;
+  read_ertr::future<> read(paddr_t addr, bufferptr &buffer) override;
+  write_ertr::future<> write(paddr_t addr, bufferptr buf) override;
+  open_ertr::future<> open() override;
+  close_ertr::future<> close() override;
 
   /*
    * alloc_extent
@@ -55,19 +55,19 @@ public:
    * and freebitmap blocks.
    *
    */
-  paddr_t alloc_extent(size_t size) final; // allocator, return blocks
+  paddr_t alloc_extent(size_t size) override; // allocator, return blocks
 
-  allocate_ret_bare alloc_extents(size_t size) final; // allocator, return blocks
+  allocate_ret_bare alloc_extents(size_t size) override; // allocator, return blocks
 
-  void complete_allocation(paddr_t addr, size_t size) final;
+  void complete_allocation(paddr_t addr, size_t size) override;
 
   size_t get_start_rbm_addr() const {
     return device->get_shard_journal_start() + device->get_journal_size();
   }
-  size_t get_size() const final {
+  size_t get_size() const override {
     return device->get_shard_end() - get_start_rbm_addr();
   };
-  extent_len_t get_block_size() const final { return device->get_block_size(); }
+  extent_len_t get_block_size() const override { return device->get_block_size(); }
 
   BlockRBManager(RBMDevice * device, std::string path, bool detailed)
     : device(device), path(path) {
@@ -76,24 +76,24 @@ public:
 
   write_ertr::future<> write(rbm_abs_addr addr, bufferlist &bl);
 
-  device_id_t get_device_id() const final {
+  device_id_t get_device_id() const override {
     assert(device);
     return device->get_device_id();
   }
 
-  uint64_t get_free_blocks() const final { 
+  uint64_t get_free_blocks() const override { 
     // TODO: return correct free blocks after block allocator is introduced
     assert(device);
     return get_size() / get_block_size();
   }
-  const seastore_meta_t &get_meta() const final {
+  const seastore_meta_t &get_meta() const override {
     return device->get_meta();
   }
   RBMDevice* get_device() {
     return device;
   }
 
-  void mark_space_used(paddr_t paddr, size_t len) final {
+  void mark_space_used(paddr_t paddr, size_t len) override {
     assert(allocator);
     rbm_abs_addr addr = convert_paddr_to_abs_addr(paddr);
     assert(addr >= get_start_rbm_addr() &&
@@ -101,7 +101,7 @@ public:
     allocator->mark_extent_used(addr, len);
   }
 
-  void mark_space_free(paddr_t paddr, size_t len) final {
+  void mark_space_free(paddr_t paddr, size_t len) override {
     assert(allocator);
     rbm_abs_addr addr = convert_paddr_to_abs_addr(paddr);
     assert(addr >= get_start_rbm_addr() &&
@@ -109,13 +109,13 @@ public:
     allocator->free_extent(addr, len);
   }
 
-  paddr_t get_start() final {
+  paddr_t get_start() override {
     return convert_abs_addr_to_paddr(
       get_start_rbm_addr(),
       device->get_device_id());
   }
 
-  rbm_extent_state_t get_extent_state(paddr_t paddr, size_t size) final {
+  rbm_extent_state_t get_extent_state(paddr_t paddr, size_t size) override {
     assert(allocator);
     rbm_abs_addr addr = convert_paddr_to_abs_addr(paddr);
     assert(addr >= get_start_rbm_addr() &&
@@ -123,14 +123,14 @@ public:
     return allocator->get_extent_state(addr, size);
   }
 
-  size_t get_journal_size() const final {
+  size_t get_journal_size() const override {
     return device->get_journal_size();
   }
 
   bool check_valid_range(rbm_abs_addr paddr, bufferptr &bptr);
 
 #ifdef UNIT_TESTS_BUILT
-  void prefill_fragmented_device() final;
+  void prefill_fragmented_device() override;
 #endif
 
 private:
index cc3f5aa3533d731e24669d97cb80e1b4e9b84c4d..73e98ed8e936c0aa097a7dbc165796f55487bfb1 100644 (file)
@@ -102,42 +102,42 @@ public:
     seastar::future<struct stat> stat(
       CollectionRef c,
       const ghobject_t& oid,
-      uint32_t op_flags = 0) final;
+      uint32_t op_flags = 0) override final;
 
     read_errorator::future<ceph::bufferlist> read(
       CollectionRef c,
       const ghobject_t& oid,
       uint64_t offset,
       size_t len,
-      uint32_t op_flags = 0) final;
+      uint32_t op_flags = 0) override final;
 
     read_errorator::future<ceph::bufferlist> readv(
       CollectionRef c,
       const ghobject_t& oid,
       interval_set<uint64_t>& m,
-      uint32_t op_flags = 0) final;
+      uint32_t op_flags = 0) override final;
 
     base_errorator::future<bool> exists(
       CollectionRef c,
       const ghobject_t& oid,
-      uint32_t op_flags = 0) final;
+      uint32_t op_flags = 0) override final;
 
     get_attr_errorator::future<ceph::bufferlist> get_attr(
       CollectionRef c,
       const ghobject_t& oid,
       std::string_view name,
-      uint32_t op_flags = 0) const final;
+      uint32_t op_flags = 0) const override final;
 
     get_attrs_ertr::future<attrs_t> get_attrs(
       CollectionRef c,
       const ghobject_t& oid,
-      uint32_t op_flags = 0) final;
+      uint32_t op_flags = 0) override final;
 
     read_errorator::future<omap_values_t> omap_get_values(
       CollectionRef c,
       const ghobject_t& oid,
       const omap_keys_t& keys,
-      uint32_t op_flags = 0) final;
+      uint32_t op_flags = 0) override final;
 
     read_errorator::future<ObjectStore::omap_iter_ret_t> omap_iterate(
       CollectionRef c,
@@ -145,12 +145,12 @@ public:
       ObjectStore::omap_iter_seek_t start_from,
       omap_iterate_cb_t callback,
       uint32_t op_flags = 0,
-      omap_iterate_conf_t on_conflict = nullptr) final;
+      omap_iterate_conf_t on_conflict = nullptr) override final;
 
     get_attr_errorator::future<bufferlist> omap_get_header(
       CollectionRef c,
       const ghobject_t& oid,
-      uint32_t op_flags = 0) final;
+      uint32_t op_flags = 0) override final;
 
     /// std::get<1>(ret) returns end if and only if the listing has listed all
     /// the items within the range, otherwise it returns the next key to be listed.
@@ -159,29 +159,29 @@ public:
       const ghobject_t& start,
       const ghobject_t& end,
       uint64_t limit,
-      uint32_t op_flags = 0) const final;
+      uint32_t op_flags = 0) const override final;
 
-    seastar::future<CollectionRef> create_new_collection(const coll_t& cid) final;
-    seastar::future<CollectionRef> open_collection(const coll_t& cid) final;
+    seastar::future<CollectionRef> create_new_collection(const coll_t& cid) override final;
+    seastar::future<CollectionRef> open_collection(const coll_t& cid) override final;
     seastar::future<> set_collection_opts(CollectionRef c,
-                                        const pool_opts_t& opts) final;
+                                        const pool_opts_t& opts) override final;
 
     seastar::future<> do_transaction_no_callbacks(
       CollectionRef ch,
-      ceph::os::Transaction&& txn) final;
+      ceph::os::Transaction&& txn) override final;
 
     /* Note, flush() machinery must go through the same pipeline
      * stages and locks as do_transaction. */
-    seastar::future<> flush(CollectionRef ch) final;
+    seastar::future<> flush(CollectionRef ch) override final;
 
     read_errorator::future<fiemap_ret_t> fiemap(
       CollectionRef ch,
       const ghobject_t& oid,
       uint64_t off,
       uint64_t len,
-      uint32_t op_flags = 0) final;
+      uint32_t op_flags = 0) override final;
 
-    unsigned get_max_attr_name_length() const final {
+    unsigned get_max_attr_name_length() const override final {
       return 256;
     }
 
@@ -551,49 +551,49 @@ public:
     MDStoreRef mdstore);
   ~SeaStore();
 
-  seastar::future<uint32_t> start() final;
-  seastar::future<> stop() final;
+  seastar::future<uint32_t> start() override;
+  seastar::future<> stop() override;
 
   Device::access_ertr::future<> _mount();
 
   // FuturizedStore::mount_ertr/mkfs_ertr only supports a stateful_ec
   // to keep the interface intact, convert to stateful_ec.
-  crimson::os::FuturizedStore::mount_ertr::future<> mount() final {
+  crimson::os::FuturizedStore::mount_ertr::future<> mount() override {
     return _mount().handle_error(
       Device::access_ertr::all_same_way([](auto& code) {
         return crimson::stateful_ec{code};
     }));
   }
-  seastar::future<> umount() final;
+  seastar::future<> umount() override;
 
   Device::access_ertr::future<> _mkfs(uuid_d new_osd_fsid);
 
-  crimson::os::FuturizedStore::mkfs_ertr::future<> mkfs(uuid_d new_osd_fsid) final {
+  crimson::os::FuturizedStore::mkfs_ertr::future<> mkfs(uuid_d new_osd_fsid) override {
     return _mkfs(new_osd_fsid).handle_error(
       Device::access_ertr::all_same_way([](auto& code) {
         return crimson::stateful_ec{code};
     }));
   }
 
-  seastar::future<store_statfs_t> stat() const final;
-  seastar::future<store_statfs_t> pool_statfs(int64_t pool_id) const final;
+  seastar::future<store_statfs_t> stat() const override;
+  seastar::future<store_statfs_t> pool_statfs(int64_t pool_id) const override;
 
-  seastar::future<> report_stats() final;
+  seastar::future<> report_stats() override;
 
-  uuid_d get_fsid() const final {
+  uuid_d get_fsid() const override {
     ceph_assert(seastar::this_shard_id() == primary_core);
     return shard_stores.local().mshard_stores[0]->get_fsid();
   }
 
-  seastar::future<> write_meta(const std::string& key, const std::string& value) final;
+  seastar::future<> write_meta(const std::string& key, const std::string& value) override;
 
-  seastar::future<std::tuple<int, std::string>> read_meta(const std::string& key) final;
+  seastar::future<std::tuple<int, std::string>> read_meta(const std::string& key) override;
 
-  seastar::future<std::vector<coll_core_t>> list_collections() final;
+  seastar::future<std::vector<coll_core_t>> list_collections() override;
 
   seastar::future<std::string> get_default_device_class() final;
 
-  BackendStore get_backend_store(store_index_t store_index) final {
+  BackendStore get_backend_store(store_index_t store_index) override {
     assert(!shard_stores.local().mshard_stores.empty());
     if (store_index != NULL_STORE_INDEX) {
       assert(store_index < shard_stores.local().mshard_stores.size());
@@ -607,7 +607,7 @@ public:
     }
   }
 
-  FuturizedStore::Shard& get_sharded_store(store_index_t store_index = 0) final
+  FuturizedStore::Shard& get_sharded_store(store_index_t store_index = 0) override
   {
     assert(store_index < shard_stores.local().mshard_stores.size());
     auto &shard_store = *(shard_stores.local().mshard_stores[store_index]);
index 515772e7736c8e2cb0fe7637273964db00f96a7c..770284aad66629e6a770ec4449faba4eea42b237 100644 (file)
@@ -92,12 +92,12 @@ class BlockSegment final : public Segment {
 public:
   BlockSegment(BlockSegmentManager &manager, segment_id_t id);
 
-  segment_id_t get_segment_id() const final { return id; }
-  segment_off_t get_write_capacity() const final;
-  segment_off_t get_write_ptr() const final { return write_pointer; }
-  close_ertr::future<> close() final;
-  write_ertr::future<> write(segment_off_t offset, ceph::bufferlist bl) final;
-  write_ertr::future<> advance_wp(segment_off_t offset) final;
+  segment_id_t get_segment_id() const override { return id; }
+  segment_off_t get_write_capacity() const override;
+  segment_off_t get_write_ptr() const override { return write_pointer; }
+  close_ertr::future<> close() override;
+  write_ertr::future<> write(segment_off_t offset, ceph::bufferlist bl) override;
+  write_ertr::future<> advance_wp(segment_off_t offset) override;
 
   ~BlockSegment() {}
 };
@@ -112,15 +112,15 @@ public:
 class BlockSegmentManager final : public SegmentManager {
 // interfaces used by Device
 public:
-  seastar::future<> start(uint32_t shard_nums) final;
+  seastar::future<> start(uint32_t shard_nums) override;
 
-  seastar::future<> stop() final;
+  seastar::future<> stop() override;
 
-  Device& get_sharded_device(store_index_t store_index = 0) final;
+  Device& get_sharded_device(store_index_t store_index = 0) override;
 
-  mount_ret mount() final;
+  mount_ret mount() override;
 
-  mkfs_ret mkfs(device_config_t) final;
+  mkfs_ret mkfs(device_config_t) override;
 // interfaces used by each shard device
 public:
   close_ertr::future<> close();
@@ -137,23 +137,24 @@ public:
 
   ~BlockSegmentManager();
 
-  open_ertr::future<SegmentRef> open(segment_id_t id) final;
+  open_ertr::future<SegmentRef> open(segment_id_t id) override;
 
-  release_ertr::future<> release(segment_id_t id) final;
+  release_ertr::future<> release(segment_id_t id) override;
 
   read_ertr::future<> read(
     paddr_t addr,
     size_t len,
-    ceph::bufferptr &out) final;
+    ceph::bufferptr &out) override;
+
   read_ertr::future<> readv(
-    paddr_t addr, std::vector<bufferptr> vecs) final;
+    paddr_t addr, std::vector<bufferptr> vecs) override;
 
-  read_ertr::future<uint32_t> get_shard_nums() final;
+  read_ertr::future<uint32_t> get_shard_nums() override;
 
-  device_type_t get_device_type() const final {
+  device_type_t get_device_type() const override {
     return superblock.config.spec.dtype;
   }
-  size_t get_available_size() const final {
+  size_t get_available_size() const override {
     return shard_info.size;
   }
   extent_len_t get_block_size() const {
@@ -163,11 +164,11 @@ public:
     return superblock.segment_size;
   }
 
-  device_id_t get_device_id() const final {
+  device_id_t get_device_id() const override {
     assert(device_id <= DEVICE_ID_MAX_VALID);
     return device_id;
   }
-  secondary_device_set_t& get_secondary_devices() final {
+  secondary_device_set_t& get_secondary_devices() override {
     return superblock.config.secondary_devices;
   }
   // public so tests can bypass segment interface when simpler
@@ -176,7 +177,7 @@ public:
     ceph::bufferlist bl,
     bool ignore_check=false);
 
-  magic_t get_magic() const final {
+  magic_t get_magic() const override {
     return superblock.config.spec.magic;
   }
 
index dc9580a11d5a5629a293b95f5b4026dbfd10fc14..47735688d45321620ca2ed091fd70f994598e9c9 100644 (file)
@@ -54,12 +54,12 @@ class EphemeralSegment final : public Segment {
 public:
   EphemeralSegment(EphemeralSegmentManager &manager, segment_id_t id);
 
-  segment_id_t get_segment_id() const final { return id; }
-  segment_off_t get_write_capacity() const final;
-  segment_off_t get_write_ptr() const final { return write_pointer; }
-  close_ertr::future<> close() final;
-  write_ertr::future<> write(segment_off_t offset, ceph::bufferlist bl) final;
-  write_ertr::future<> advance_wp(segment_off_t offset) final;
+  segment_id_t get_segment_id() const override { return id; }
+  segment_off_t get_write_capacity() const override;
+  segment_off_t get_write_ptr() const override { return write_pointer; }
+  close_ertr::future<> close() override;
+  write_ertr::future<> write(segment_off_t offset, ceph::bufferlist bl) override;
+  write_ertr::future<> advance_wp(segment_off_t offset) override;
 
   ~EphemeralSegment() {}
 };
@@ -71,7 +71,7 @@ class EphemeralSegmentManager final : public SegmentManager {
   const ephemeral_config_t config;
   std::optional<device_config_t> device_config;
 
-  device_type_t get_device_type() const final {
+  device_type_t get_device_type() const override {
     assert(device_config);
     return device_config->spec.dtype;
   }
@@ -97,55 +97,55 @@ public:
 
   ~EphemeralSegmentManager();
 
-  close_ertr::future<> close() final {
+  close_ertr::future<> close() override {
     return close_ertr::now();
   }
 
-  device_id_t get_device_id() const final {
+  device_id_t get_device_id() const override {
     assert(device_config);
     return device_config->spec.id;
   }
 
-  mount_ret mount() final {
+  mount_ret mount() override {
     return mount_ertr::now();
   }
 
-  mkfs_ret mkfs(device_config_t) final;
+  mkfs_ret mkfs(device_config_t) override;
 
-  open_ertr::future<SegmentRef> open(segment_id_t id) final;
+  open_ertr::future<SegmentRef> open(segment_id_t id) override;
 
-  release_ertr::future<> release(segment_id_t id) final;
+  release_ertr::future<> release(segment_id_t id) override;
 
   read_ertr::future<> read(
     paddr_t addr,
     size_t len,
-    ceph::bufferptr &out) final;
+    ceph::bufferptr &out) override;
 
   read_ertr::future<> readv(
     paddr_t addr,
-    std::vector<bufferptr> ptr) final;
+    std::vector<bufferptr> ptr) override;
 
-  size_t get_available_size() const final {
+  size_t get_available_size() const override {
     return config.size;
   }
-  extent_len_t get_block_size() const final {
+  extent_len_t get_block_size() const override {
     return config.block_size;
   }
-  segment_off_t get_segment_size() const final {
+  segment_off_t get_segment_size() const override {
     return config.segment_size;
   }
 
-  const seastore_meta_t &get_meta() const final {
+  const seastore_meta_t &get_meta() const override {
     assert(device_config);
     return device_config->meta;
   }
 
-  secondary_device_set_t& get_secondary_devices() final {
+  secondary_device_set_t& get_secondary_devices() override {
     assert(device_config);
     return device_config->secondary_devices;
   }
 
-  magic_t get_magic() const final {
+  magic_t get_magic() const override {
     return device_config->spec.magic;
   }
 
index 4e6976e4eba316b3cd2fcf04ab48564f240ca3df..382223b138f7cb4e4c8b019da59fb658eec383c1 100644 (file)
@@ -101,12 +101,12 @@ namespace crimson::os::seastore::segment_manager::zbd {
   public:
     ZBDSegment(ZBDSegmentManager &man, segment_id_t i) : manager(man), id(i){};
 
-    segment_id_t get_segment_id() const final { return id; }
-    segment_off_t get_write_capacity() const final;
-    segment_off_t get_write_ptr() const final { return write_pointer; }
-    close_ertr::future<> close() final;
-    write_ertr::future<> write(segment_off_t offset, ceph::bufferlist bl) final;
-    write_ertr::future<> advance_wp(segment_off_t offset) final;
+    segment_id_t get_segment_id() const override { return id; }
+    segment_off_t get_write_capacity() const override;
+    segment_off_t get_write_ptr() const override { return write_pointer; }
+    close_ertr::future<> close() override;
+    write_ertr::future<> write(segment_off_t offset, ceph::bufferlist bl) override;
+    write_ertr::future<> advance_wp(segment_off_t offset) override;
 
     ~ZBDSegment() {}
   private:
@@ -120,27 +120,27 @@ namespace crimson::os::seastore::segment_manager::zbd {
   class ZBDSegmentManager final : public SegmentManager{
   // interfaces used by Device
   public:
-    seastar::future<> start(uint32_t shard_nums) final;
+    seastar::future<> start(uint32_t shard_nums) override;
 
-    seastar::future<> stop() final;
+    seastar::future<> stop() override;
 
-    Device& get_sharded_device(store_index_t store_index = 0) final;
+    Device& get_sharded_device(store_index_t store_index = 0) override;
 
-    mount_ret mount() final;
-    mkfs_ret mkfs(device_config_t meta) final;
+    mount_ret mount() override;
+    mkfs_ret mkfs(device_config_t meta) override;
 
     ZBDSegmentManager(const std::string &path, store_index_t store_index = 0)
     : device_path(path),
       store_index(store_index) {}
 
-    ~ZBDSegmentManager() final = default;
+    ~ZBDSegmentManager() override = default;
 
   //interfaces used by each shard device
   public:
-    open_ertr::future<SegmentRef> open(segment_id_t id) final;
-    close_ertr::future<> close() final;
+    open_ertr::future<SegmentRef> open(segment_id_t id) override;
+    close_ertr::future<> close() override;
 
-    release_ertr::future<> release(segment_id_t id) final;
+    release_ertr::future<> release(segment_id_t id) override;
 
     read_ertr::future<> read(
       paddr_t addr, 
@@ -148,23 +148,23 @@ namespace crimson::os::seastore::segment_manager::zbd {
       ceph::bufferptr &out) final;
     read_ertr::future<> readv(
       paddr_t addr,
-      std::vector<bufferptr> ptrs) final;
+      std::vector<bufferptr> ptrs) override;
 
-    read_ertr::future<uint32_t> get_shard_nums() final;
+    read_ertr::future<uint32_t> get_shard_nums() override;
 
-    device_type_t get_device_type() const final {
+    device_type_t get_device_type() const override {
       return device_type_t::ZBD;
     }
 
-    size_t get_available_size() const final {
+    size_t get_available_size() const override {
       return shard_info.size;
     };
 
-    extent_len_t get_block_size() const final {
+    extent_len_t get_block_size() const override {
       return metadata.block_size;
     };
 
-    segment_off_t get_segment_size() const final {
+    segment_off_t get_segment_size() const override {
       return metadata.segment_capacity;
     };
 
@@ -172,11 +172,11 @@ namespace crimson::os::seastore::segment_manager::zbd {
       return metadata.meta;
     };
 
-    device_id_t get_device_id() const final;
+    device_id_t get_device_id() const override;
 
-    secondary_device_set_t& get_secondary_devices() final;
+    secondary_device_set_t& get_secondary_devices() override;
 
-    magic_t get_magic() const final;
+    magic_t get_magic() const override;
 
     Segment::write_ertr::future<> segment_write(
     paddr_t addr,