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,
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;
}
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,
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(
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(
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
};
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());
}
}
- 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]);
}
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();
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);
}
* ---------------------------------------------------------------------------
*/
- 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
* 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) {
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() &&
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() &&
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() &&
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:
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,
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.
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;
}
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());
}
}
- 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]);
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() {}
};
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();
~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 {
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
ceph::bufferlist bl,
bool ignore_check=false);
- magic_t get_magic() const final {
+ magic_t get_magic() const override {
return superblock.config.spec.magic;
}
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() {}
};
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;
}
~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;
}
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:
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,
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;
};
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,