Fix incorrect reading of extra metadata block

hugo-docs
Vitaliy Filippov 2022-04-21 02:52:10 +03:00
parent 98e3528a14
commit e718116f54
3 changed files with 11 additions and 6 deletions

View File

@ -224,15 +224,19 @@ const etcd_tree = {
}, */ }, */
}, },
inodestats: { inodestats: {
/* <inode_t>: { /* <pool_id>: {
read: { count: uint64_t, usec: uint64_t, bytes: uint64_t }, <inode_t>: {
write: { count: uint64_t, usec: uint64_t, bytes: uint64_t }, read: { count: uint64_t, usec: uint64_t, bytes: uint64_t },
delete: { count: uint64_t, usec: uint64_t, bytes: uint64_t }, write: { count: uint64_t, usec: uint64_t, bytes: uint64_t },
delete: { count: uint64_t, usec: uint64_t, bytes: uint64_t },
},
}, */ }, */
}, },
space: { space: {
/* <osd_num_t>: { /* <osd_num_t>: {
<inode_t>: uint64_t, // bytes <pool_id>: {
<inode_t>: uint64_t, // bytes
},
}, */ }, */
}, },
}, },

View File

@ -131,6 +131,7 @@ resume_1:
} }
// Skip superblock // Skip superblock
bs->meta_offset += bs->meta_block_size; bs->meta_offset += bs->meta_block_size;
bs->meta_len -= bs->meta_block_size;
prev_done = 0; prev_done = 0;
done_len = 0; done_len = 0;
done_pos = 0; done_pos = 0;

View File

@ -189,7 +189,7 @@ void osd_t::report_statistics()
for (auto kv: bs->get_inode_space_stats()) for (auto kv: bs->get_inode_space_stats())
{ {
pool_id_t pool_id = INODE_POOL(kv.first); pool_id_t pool_id = INODE_POOL(kv.first);
uint64_t only_inode_num = (kv.first & (((uint64_t)1 << (64-POOL_ID_BITS)) - 1)); uint64_t only_inode_num = INODE_NO_POOL(kv.first);
if (!last_pool || pool_id != last_pool) if (!last_pool || pool_id != last_pool)
{ {
if (last_pool) if (last_pool)