[all] Eliminate duplicated sector_t typedefs

This commit is contained in:
Ming-Hung Tsai 2020-06-17 12:56:40 +08:00
parent a345b894d3
commit 621b466333
5 changed files with 4 additions and 8 deletions

View File

@ -24,7 +24,6 @@ namespace bi = boost::intrusive;
namespace bcache { namespace bcache {
typedef uint64_t block_address; typedef uint64_t block_address;
typedef uint64_t sector_t;
class validator { class validator {
public: public:

View File

@ -1,6 +1,7 @@
#ifndef BLOCK_CACHE_IO_ENGINE_H #ifndef BLOCK_CACHE_IO_ENGINE_H
#define BLOCK_CACHE_IO_ENGINE_H #define BLOCK_CACHE_IO_ENGINE_H
#include "base/types.h"
#include "base/unique_handle.h" #include "base/unique_handle.h"
#include <boost/optional.hpp> #include <boost/optional.hpp>
@ -18,9 +19,8 @@
//---------------------------------------------------------------- //----------------------------------------------------------------
namespace bcache { namespace bcache {
using sector_t = uint64_t; using base::sector_t;
using base::SECTOR_SHIFT;
unsigned const SECTOR_SHIFT = 9;
// Virtual base class to aid unit testing // Virtual base class to aid unit testing
class io_engine { class io_engine {

View File

@ -34,8 +34,6 @@ namespace cache {
block_address const SUPERBLOCK_LOCATION = 0; block_address const SUPERBLOCK_LOCATION = 0;
typedef uint64_t sector_t;
//------------------------------------------------ //------------------------------------------------
class space_map_ref_counter { class space_map_ref_counter {

View File

@ -37,7 +37,6 @@ namespace thin_provisioning {
using namespace base; using namespace base;
using namespace persistent_data; using namespace persistent_data;
typedef uint64_t sector_t;
typedef uint32_t thin_dev_t; typedef uint32_t thin_dev_t;
//------------------------------------------------ //------------------------------------------------

View File

@ -301,7 +301,7 @@ thin_pool::get_nr_free_data_blocks() const
return md_->data_sm_->get_nr_free(); return md_->data_sm_->get_nr_free();
} }
thin_provisioning::sector_t sector_t
thin_pool::get_data_block_size() const thin_pool::get_data_block_size() const
{ {
return md_->sb_.data_block_size_; return md_->sb_.data_block_size_;