|
32 | 32 |
|
33 | 33 | #include "include/ceph_assert.h" |
34 | 34 | #include <boost/serialization/strong_typedef.hpp> |
35 | | -#include "common/ceph_json.h" |
36 | 35 |
|
37 | 36 | #define CEPH_FS_ONDISK_MAGIC "ceph fs volume v011" |
38 | 37 | #define MAX_MDS 0x100 |
39 | 38 |
|
| 39 | +class JSONObj; |
| 40 | + |
40 | 41 | BOOST_STRONG_TYPEDEF(uint64_t, mds_gid_t) |
41 | 42 | extern const mds_gid_t MDS_GID_NONE; |
42 | 43 |
|
@@ -1233,67 +1234,6 @@ void inode_t<Allocator>::dump(ceph::Formatter *f) const |
1233 | 1234 | f->close_section(); |
1234 | 1235 | } |
1235 | 1236 |
|
1236 | | -template<template<typename> class Allocator> |
1237 | | -void inode_t<Allocator>::client_ranges_cb(typename inode_t<Allocator>::client_range_map& c, JSONObj *obj){ |
1238 | | - |
1239 | | - int64_t client; |
1240 | | - JSONDecoder::decode_json("client", client, obj, true); |
1241 | | - client_writeable_range_t client_range_tmp; |
1242 | | - JSONDecoder::decode_json("byte range", client_range_tmp.range, obj, true); |
1243 | | - JSONDecoder::decode_json("follows", client_range_tmp.follows.val, obj, true); |
1244 | | - c[client] = client_range_tmp; |
1245 | | -} |
1246 | | - |
1247 | | -template<template<typename> class Allocator> |
1248 | | -void inode_t<Allocator>::old_pools_cb(compact_set<int64_t, std::less<int64_t>, Allocator<int64_t> >& c, JSONObj *obj){ |
1249 | | - |
1250 | | - int64_t tmp; |
1251 | | - decode_json_obj(tmp, obj); |
1252 | | - c.insert(tmp); |
1253 | | -} |
1254 | | - |
1255 | | -template<template<typename> class Allocator> |
1256 | | -void inode_t<Allocator>::decode_json(JSONObj *obj) |
1257 | | -{ |
1258 | | - |
1259 | | - JSONDecoder::decode_json("ino", ino.val, obj, true); |
1260 | | - JSONDecoder::decode_json("rdev", rdev, obj, true); |
1261 | | - //JSONDecoder::decode_json("ctime", ctime, obj, true); |
1262 | | - //JSONDecoder::decode_json("btime", btime, obj, true); |
1263 | | - JSONDecoder::decode_json("mode", mode, obj, true); |
1264 | | - JSONDecoder::decode_json("uid", uid, obj, true); |
1265 | | - JSONDecoder::decode_json("gid", gid, obj, true); |
1266 | | - JSONDecoder::decode_json("nlink", nlink, obj, true); |
1267 | | - JSONDecoder::decode_json("dir_layout", dir_layout, obj, true); |
1268 | | - JSONDecoder::decode_json("layout", layout, obj, true); |
1269 | | - JSONDecoder::decode_json("old_pools", old_pools, inode_t<Allocator>::old_pools_cb, obj, true); |
1270 | | - JSONDecoder::decode_json("size", size, obj, true); |
1271 | | - JSONDecoder::decode_json("truncate_seq", truncate_seq, obj, true); |
1272 | | - JSONDecoder::decode_json("truncate_size", truncate_size, obj, true); |
1273 | | - JSONDecoder::decode_json("truncate_from", truncate_from, obj, true); |
1274 | | - JSONDecoder::decode_json("truncate_pending", truncate_pending, obj, true); |
1275 | | - //JSONDecoder::decode_json("mtime", mtime, obj, true); |
1276 | | - //JSONDecoder::decode_json("atime", atime, obj, true); |
1277 | | - JSONDecoder::decode_json("time_warp_seq", time_warp_seq, obj, true); |
1278 | | - JSONDecoder::decode_json("change_attr", change_attr, obj, true); |
1279 | | - JSONDecoder::decode_json("export_pin", export_pin, obj, true); |
1280 | | - JSONDecoder::decode_json("client_ranges", client_ranges, inode_t<Allocator>::client_ranges_cb, obj, true); |
1281 | | - JSONDecoder::decode_json("dirstat", dirstat, obj, true); |
1282 | | - JSONDecoder::decode_json("rstat", rstat, obj, true); |
1283 | | - JSONDecoder::decode_json("accounted_rstat", accounted_rstat, obj, true); |
1284 | | - JSONDecoder::decode_json("version", version, obj, true); |
1285 | | - JSONDecoder::decode_json("file_data_version", file_data_version, obj, true); |
1286 | | - JSONDecoder::decode_json("xattr_version", xattr_version, obj, true); |
1287 | | - JSONDecoder::decode_json("backtrace_version", backtrace_version, obj, true); |
1288 | | - JSONDecoder::decode_json("stray_prior_path", stray_prior_path, obj, true); |
1289 | | - JSONDecoder::decode_json("max_size_ever", max_size_ever, obj, true); |
1290 | | - JSONDecoder::decode_json("quota", quota, obj, true); |
1291 | | - JSONDecoder::decode_json("last_scrub_stamp", last_scrub_stamp, obj, true); |
1292 | | - JSONDecoder::decode_json("last_scrub_version", last_scrub_version, obj, true); |
1293 | | - JSONDecoder::decode_json("remote_ino", remote_ino.val, obj, true); |
1294 | | - JSONDecoder::decode_json("referent_inodes", referent_inodes, obj, true); |
1295 | | -} |
1296 | | - |
1297 | 1237 | template<template<typename> class Allocator> |
1298 | 1238 | void inode_t<Allocator>::generate_test_instances(std::list<inode_t*>& ls) |
1299 | 1239 | { |
|
0 commit comments