diff --git a/block-cache/block_cache.h b/block-cache/block_cache.h index 5312468..28dec8b 100644 --- a/block-cache/block_cache.h +++ b/block-cache/block_cache.h @@ -24,7 +24,6 @@ namespace bi = boost::intrusive; namespace bcache { typedef uint64_t block_address; - typedef uint64_t sector_t; class validator { public: diff --git a/block-cache/io_engine.h b/block-cache/io_engine.h index 0e13957..04e05e1 100644 --- a/block-cache/io_engine.h +++ b/block-cache/io_engine.h @@ -1,6 +1,7 @@ #ifndef BLOCK_CACHE_IO_ENGINE_H #define BLOCK_CACHE_IO_ENGINE_H +#include "base/types.h" #include "base/unique_handle.h" #include @@ -18,9 +19,8 @@ //---------------------------------------------------------------- namespace bcache { - using sector_t = uint64_t; - - unsigned const SECTOR_SHIFT = 9; + using base::sector_t; + using base::SECTOR_SHIFT; // Virtual base class to aid unit testing class io_engine { diff --git a/caching/cache_metadata.h b/caching/cache_metadata.h index a89afd5..761f196 100644 --- a/caching/cache_metadata.h +++ b/caching/cache_metadata.h @@ -34,8 +34,6 @@ namespace cache { block_address const SUPERBLOCK_LOCATION = 0; - typedef uint64_t sector_t; - //------------------------------------------------ class space_map_ref_counter { diff --git a/thin-provisioning/metadata.h b/thin-provisioning/metadata.h index e8bb5fc..d7d1afe 100644 --- a/thin-provisioning/metadata.h +++ b/thin-provisioning/metadata.h @@ -37,7 +37,6 @@ namespace thin_provisioning { using namespace base; using namespace persistent_data; - typedef uint64_t sector_t; typedef uint32_t thin_dev_t; //------------------------------------------------ diff --git a/thin-provisioning/thin_pool.cc b/thin-provisioning/thin_pool.cc index 3dca9de..3bdc9e7 100644 --- a/thin-provisioning/thin_pool.cc +++ b/thin-provisioning/thin_pool.cc @@ -301,7 +301,7 @@ thin_pool::get_nr_free_data_blocks() const return md_->data_sm_->get_nr_free(); } -thin_provisioning::sector_t +sector_t thin_pool::get_data_block_size() const { return md_->sb_.data_block_size_;