Fix metadata partition length, fix journal allocation at the end

This commit is contained in:
Vitaliy Filippov
2019-11-27 19:39:18 +03:00
parent 876231d26b
commit 2630e2e3b9
4 changed files with 20 additions and 7 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ void blockstore::calc_lengths(spp::sparse_hash_map<std::string, std::string> & c
}
// required metadata size
block_count = data_len / block_size;
meta_len = block_count * sizeof(clean_disk_entry);
meta_len = (block_count / (512 / sizeof(clean_disk_entry))) * 512;
if (meta_area < meta_len)
{
throw std::runtime_error("Metadata area is too small");