Reject all-zero blocks, mark empty space with a special entry type during init

This commit is contained in:
Vitaliy Filippov
2025-12-02 01:52:12 +03:00
parent abe093b9a3
commit e55ca26ff6
6 changed files with 90 additions and 26 deletions
+3
View File
@@ -116,6 +116,7 @@ close_error:
{
obj_fn(heap, obj, meta_block_num);
});
obj_fn(heap, NULL, 0);
delete heap;
}
else if (hdr->zero == 0 && hdr->magic == BLOCKSTORE_META_MAGIC_V1)
@@ -288,6 +289,8 @@ int disk_tool_t::dump_meta()
},
[this](blockstore_heap_t *heap, heap_entry_t *obj, uint32_t meta_block_num)
{
if (!obj)
return;
if (dump_as_old)
dump_heap_entry_as_old(heap, obj);
else