Add metadata superblock and check it on start

Refuse to start if the superblock is missing or bad version;
zero out the metadata area when initializing superblock.
This commit is contained in:
Vitaliy Filippov
2021-04-10 22:26:17 +03:00
parent f684d9101a
commit 2a02f3c4c7
5 changed files with 152 additions and 27 deletions
+1
View File
@@ -7,6 +7,7 @@ class blockstore_init_meta
{
blockstore_impl_t *bs;
int wait_state = 0, wait_count = 0;
bool zero_on_init = false;
void *metadata_buffer = NULL;
uint64_t metadata_read = 0;
int prev = 0, prev_done = 0, done_len = 0, submitted = 0;