rename NoOpRefCounter -> no_op_ref_counter
This commit is contained in:
parent
4eadd9438e
commit
7d18b08b91
@ -29,9 +29,8 @@
|
|||||||
//----------------------------------------------------------------
|
//----------------------------------------------------------------
|
||||||
|
|
||||||
namespace persistent_data {
|
namespace persistent_data {
|
||||||
// FIXME: why is this class capitalised? fix.
|
|
||||||
template <typename ValueType>
|
template <typename ValueType>
|
||||||
class NoOpRefCounter {
|
class no_op_ref_counter {
|
||||||
public:
|
public:
|
||||||
void inc(ValueType const &v) {}
|
void inc(ValueType const &v) {}
|
||||||
void dec(ValueType const &v) {}
|
void dec(ValueType const &v) {}
|
||||||
@ -40,7 +39,7 @@ namespace persistent_data {
|
|||||||
struct uint64_traits {
|
struct uint64_traits {
|
||||||
typedef base::__le64 disk_type;
|
typedef base::__le64 disk_type;
|
||||||
typedef uint64_t value_type;
|
typedef uint64_t value_type;
|
||||||
typedef NoOpRefCounter<uint64_t> ref_counter;
|
typedef no_op_ref_counter<uint64_t> ref_counter;
|
||||||
|
|
||||||
static void unpack(disk_type const &disk, value_type &value) {
|
static void unpack(disk_type const &disk, value_type &value) {
|
||||||
value = base::to_cpu<uint64_t>(disk);
|
value = base::to_cpu<uint64_t>(disk);
|
||||||
@ -359,7 +358,7 @@ namespace persistent_data {
|
|||||||
typename persistent_data::transaction_manager::ptr tm_;
|
typename persistent_data::transaction_manager::ptr tm_;
|
||||||
bool destroy_;
|
bool destroy_;
|
||||||
block_address root_;
|
block_address root_;
|
||||||
NoOpRefCounter<uint64_t> internal_rc_;
|
no_op_ref_counter<uint64_t> internal_rc_;
|
||||||
typename ValueTraits::ref_counter rc_;
|
typename ValueTraits::ref_counter rc_;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -196,7 +196,7 @@ namespace {
|
|||||||
struct ref_count_traits {
|
struct ref_count_traits {
|
||||||
typedef __le32 disk_type;
|
typedef __le32 disk_type;
|
||||||
typedef uint32_t value_type;
|
typedef uint32_t value_type;
|
||||||
typedef NoOpRefCounter<uint32_t> ref_counter;
|
typedef no_op_ref_counter<uint32_t> ref_counter;
|
||||||
|
|
||||||
static void unpack(disk_type const &d, value_type &v) {
|
static void unpack(disk_type const &d, value_type &v) {
|
||||||
v = to_cpu<value_type>(d);
|
v = to_cpu<value_type>(d);
|
||||||
|
@ -45,7 +45,7 @@ namespace persistent_data {
|
|||||||
struct index_entry_traits {
|
struct index_entry_traits {
|
||||||
typedef index_entry_disk disk_type;
|
typedef index_entry_disk disk_type;
|
||||||
typedef index_entry value_type;
|
typedef index_entry value_type;
|
||||||
typedef NoOpRefCounter<index_entry> ref_counter;
|
typedef no_op_ref_counter<index_entry> ref_counter;
|
||||||
|
|
||||||
static void unpack(disk_type const &disk, value_type &value) {
|
static void unpack(disk_type const &disk, value_type &value) {
|
||||||
value.blocknr_ = to_cpu<uint64_t>(disk.blocknr_);
|
value.blocknr_ = to_cpu<uint64_t>(disk.blocknr_);
|
||||||
@ -88,7 +88,7 @@ namespace persistent_data {
|
|||||||
struct sm_root_traits {
|
struct sm_root_traits {
|
||||||
typedef sm_root_disk disk_type;
|
typedef sm_root_disk disk_type;
|
||||||
typedef sm_root value_type;
|
typedef sm_root value_type;
|
||||||
typedef NoOpRefCounter<sm_root> ref_counter;
|
typedef no_op_ref_counter<sm_root> ref_counter;
|
||||||
|
|
||||||
static void unpack(disk_type const &disk, value_type &value) {
|
static void unpack(disk_type const &disk, value_type &value) {
|
||||||
value.nr_blocks_ = to_cpu<uint64_t>(disk.nr_blocks_);
|
value.nr_blocks_ = to_cpu<uint64_t>(disk.nr_blocks_);
|
||||||
|
@ -44,7 +44,7 @@ namespace thin_provisioning {
|
|||||||
struct device_details_traits {
|
struct device_details_traits {
|
||||||
typedef device_details_disk disk_type;
|
typedef device_details_disk disk_type;
|
||||||
typedef device_details value_type;
|
typedef device_details value_type;
|
||||||
typedef persistent_data::NoOpRefCounter<device_details> ref_counter;
|
typedef persistent_data::no_op_ref_counter<device_details> ref_counter;
|
||||||
|
|
||||||
static void unpack(device_details_disk const &disk, device_details &value);
|
static void unpack(device_details_disk const &disk, device_details &value);
|
||||||
static void pack(device_details const &value, device_details_disk &disk);
|
static void pack(device_details const &value, device_details_disk &disk);
|
||||||
@ -123,7 +123,7 @@ namespace thin_provisioning {
|
|||||||
struct superblock_traits {
|
struct superblock_traits {
|
||||||
typedef superblock_disk disk_type;
|
typedef superblock_disk disk_type;
|
||||||
typedef superblock value_type;
|
typedef superblock value_type;
|
||||||
typedef NoOpRefCounter<superblock> ref_counter;
|
typedef no_op_ref_counter<superblock> ref_counter;
|
||||||
|
|
||||||
static void unpack(superblock_disk const &disk, superblock &value);
|
static void unpack(superblock_disk const &disk, superblock &value);
|
||||||
static void pack(superblock const &value, superblock_disk &disk);
|
static void pack(superblock const &value, superblock_disk &disk);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user