[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 {
typedef uint64_t block_address;
typedef uint64_t sector_t;
class validator {
public:

View File

@ -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 <boost/optional.hpp>
@ -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 {

View File

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

View File

@ -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;
//------------------------------------------------

View File

@ -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_;