[block manager] Don't allow the cache to be bigger than the block dev.

This commit is contained in:
Joe Thornber
2017-07-24 15:28:23 +01:00
parent fd02dfa5bf
commit 209af19a02
2 changed files with 10 additions and 2 deletions

View File

@@ -135,6 +135,7 @@ namespace persistent_data {
bool is_locked(block_address b) const;
private:
uint64_t choose_cache_size(block_address nr_blocks) const;
int open_or_create_block_file(std::string const &path, off_t file_size,
mode m, bool excl);
void check(block_address b) const;