Use an interface instead of explicit blockstore_t wrapper

This commit is contained in:
Vitaliy Filippov
2025-11-23 01:48:44 +03:00
parent 1badc6ad13
commit 8ee7058ec8
10 changed files with 50 additions and 121 deletions
+5 -1
View File
@@ -196,7 +196,7 @@ struct pool_shard_settings_t
#define STAB_SPLIT_SYNC 3
#define STAB_SPLIT_TODO 4
class blockstore_impl_t
class blockstore_impl_t: public blockstore_i
{
blockstore_disk_t dsk;
@@ -361,6 +361,7 @@ public:
blockstore_impl_t(blockstore_config_t & config, ring_loop_t *ringloop, timerfd_manager_t *tfd);
~blockstore_impl_t();
void parse_config(blockstore_config_t & config);
void parse_config(blockstore_config_t & config, bool init);
// Event loop
@@ -396,6 +397,9 @@ public:
// Print diagnostics to stdout
void dump_diagnostics();
// Get diagnostic string for an operation
std::string get_op_diag(blockstore_op_t *op);
inline uint32_t get_block_size() { return dsk.data_block_size; }
inline uint64_t get_block_count() { return dsk.block_count; }
inline uint64_t get_free_block_count() { return dsk.block_count - used_blocks; }