Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
//
// Created by evie on 4/18/17.
//
#include "classes/fs_data.hpp"
// getter/setter
const std::unordered_map<std::string, std::string>& FsData::hashmap() const {
return hashmap_;
}
void FsData::hashmap(const std::unordered_map<std::string, std::string>& hashmap_) {
FsData::hashmap_ = hashmap_;
}
const std::hash<std::string>& FsData::hashf() const {
return hashf_;
}
void FsData::hashf(const std::hash<std::string>& hashf_) {
FsData::hashf_ = hashf_;
}
blksize_t FsData::blocksize() const {
return blocksize_;
}
void FsData::blocksize(blksize_t blocksize_) {
FsData::blocksize_ = blocksize_;
}
const std::shared_ptr<spdlog::logger>& FsData::spdlogger() const {
return spdlogger_;
}
void FsData::spdlogger(const std::shared_ptr<spdlog::logger>& spdlogger_) {
FsData::spdlogger_ = spdlogger_;
}
const std::string& FsData::rootdir() const {
return rootdir_;
}
void FsData::rootdir(const std::string& rootdir_) {
FsData::rootdir_ = rootdir_;
}
const std::string& FsData::inode_path() const {
return inode_path_;
}
void FsData::inode_path(const std::string& inode_path_) {
FsData::inode_path_ = inode_path_;
}
const std::string& FsData::dentry_path() const {
return dentry_path_;
}
void FsData::dentry_path(const std::string& dentry_path_) {
FsData::dentry_path_ = dentry_path_;
}
const std::string& FsData::chunk_path() const {
return chunk_path_;
}
void FsData::chunk_path(const std::string& chunk_path_) {
FsData::chunk_path_ = chunk_path_;
}
const std::string& FsData::mgmt_path() const {
return mgmt_path_;
}
void FsData::mgmt_path(const std::string& mgmt_path_) {
FsData::mgmt_path_ = mgmt_path_;
}
const rocksdb::Options& FsData::rdb_options() const {
return rdb_options_;
}
void FsData::rdb_options(const rocksdb::Options& rdb_options) {
FsData::rdb_options_ = rdb_options;
}
const std::string& FsData::rdb_path() const {
return rdb_path_;
}
void FsData::rdb_path(const std::string& rdb_path) {
FsData::rdb_path_ = rdb_path;
}
const std::shared_ptr<rocksdb::DB>& FsData::rdb() const {
return rdb_;
}
void FsData::rdb(const std::shared_ptr<rocksdb::DB>& rdb) {
FsData::rdb_ = rdb;
}
const std::shared_ptr<rocksdb::OptimisticTransactionDB>& FsData::txn_rdb() const {
return txn_rdb_;
}
void FsData::txn_rdb(const std::shared_ptr<rocksdb::OptimisticTransactionDB>& tx_rdb) {
FsData::txn_rdb_ = tx_rdb;
}
const std::shared_ptr<rocksdb::DB>& FsData::rdb_crt() const {
return rdb_crt_;
}
void FsData::rdb_crt(const std::shared_ptr<rocksdb::DB>& rdb_crt) {
FsData::rdb_crt_ = rdb_crt;
}
const rocksdb::OptimisticTransactionOptions& FsData::txn_rdb_options() const {
return txn_rdb_options_;
}
void FsData::txn_rdb_options(const rocksdb::OptimisticTransactionOptions& tx_rdb_options) {
FsData::txn_rdb_options_ = tx_rdb_options;
}
const rocksdb::WriteOptions& FsData::rdb_write_options() const {
return rdb_write_options_;
}
void FsData::rdb_write_options(const rocksdb::WriteOptions& rdb_write_options) {
FsData::rdb_write_options_ = rdb_write_options;
}
//fuse_ino_t FsData::inode_count() const {
// return inode_count_;
//}
//
//void FsData::inode_count(fuse_ino_t inode_count) {
// FsData::inode_count_ = inode_count;
//}
const std::map<uint64_t, std::string>& FsData::hosts() const {
return hosts_;
}
void FsData::hosts(const std::map<uint64_t, std::string>& hosts) {
FsData::hosts_ = hosts;
}
const uint64_t& FsData::host_id() const {
return host_id_;
}
void FsData::host_id(const uint64_t& host_id) {
FsData::host_id_ = host_id;
}
size_t FsData::host_size() const {
return host_size_;
}
void FsData::host_size(size_t host_size) {
FsData::host_size_ = host_size;
}
std::string FsData::rpc_port() const {
return rpc_port_;
}
void FsData::rpc_port(std::string rpc_port) {
FsData::rpc_port_ = rpc_port;
}
// Utility member functions
//fuse_ino_t FsData::raise_inode_count(fuse_ino_t count) {
// FsData::inode_count_ += count;
// return FsData::inode_count_;
//}
bool FsData::is_local_op(const size_t recipient) {
return recipient == host_id_;
}