Add inode space usage statistics tracking to blockstore

This commit is contained in:
Vitaliy Filippov
2021-04-10 17:44:12 +03:00
parent 0aa2dd2890
commit c35963967f
5 changed files with 24 additions and 0 deletions
+4
View File
@@ -118,6 +118,10 @@ void blockstore_init_meta::handle_entries(void* entries, unsigned count, int blo
#endif
bs->data_alloc->set(clean_it->second.location >> block_order, false);
}
else
{
bs->inode_space_stats[entry->oid.inode] += bs->block_size;
}
entries_loaded++;
#ifdef BLOCKSTORE_DEBUG
printf("Allocate block (clean entry) %lu: %lx:%lx v%lu\n", done_cnt+i, entry->oid.inode, entry->oid.stripe, entry->version);