[*_restore] if things go wrong wipe the superblock.

So we don't leave the metadata device with partially restored metadata.
This commit is contained in:
Joe Thornber
2017-09-28 14:39:24 +01:00
parent 8035e10b2a
commit 5b92f410ec
5 changed files with 35 additions and 3 deletions

View File

@@ -14,6 +14,7 @@ namespace file_utils {
int create_block_file(std::string const &path, off_t file_size);
int open_block_file(std::string const &path, off_t min_size, bool writeable, bool excl = true);
uint64_t get_file_length(std::string const &file);
void zero_superblock(std::string const &path);
}
//----------------------------------------------------------------