forked from vitalif/vitastor
Fix incorrect reading of extra metadata block
parent
98e3528a14
commit
e718116f54
|
@ -224,15 +224,19 @@ const etcd_tree = {
|
||||||
}, */
|
}, */
|
||||||
},
|
},
|
||||||
inodestats: {
|
inodestats: {
|
||||||
/* <inode_t>: {
|
/* <pool_id>: {
|
||||||
|
<inode_t>: {
|
||||||
read: { count: uint64_t, usec: uint64_t, bytes: uint64_t },
|
read: { count: uint64_t, usec: uint64_t, bytes: uint64_t },
|
||||||
write: { 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 },
|
delete: { count: uint64_t, usec: uint64_t, bytes: uint64_t },
|
||||||
|
},
|
||||||
}, */
|
}, */
|
||||||
},
|
},
|
||||||
space: {
|
space: {
|
||||||
/* <osd_num_t>: {
|
/* <osd_num_t>: {
|
||||||
|
<pool_id>: {
|
||||||
<inode_t>: uint64_t, // bytes
|
<inode_t>: uint64_t, // bytes
|
||||||
|
},
|
||||||
}, */
|
}, */
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue