diff --git a/CHANGES b/CHANGES index 16bf825..491c24a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ +v0.7.5 +====== + +- Fix a bug that stopped cache_restore working with metadata version 2. + v0.7.4 ====== diff --git a/VERSION b/VERSION index 0a1ffad..8bd6ba8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.7.4 +0.7.5 diff --git a/base/file_utils.cc b/base/file_utils.cc index b8741d2..7173000 100644 --- a/base/file_utils.cc +++ b/base/file_utils.cc @@ -151,6 +151,8 @@ file_utils::zero_superblock(std::string const &path) memset(buffer, 0, SUPERBLOCK_SIZE); if (::write(fd, buffer, SUPERBLOCK_SIZE) != SUPERBLOCK_SIZE) throw runtime_error("couldn't zero superblock"); + + ::close(fd); } //---------------------------------------------------------------- diff --git a/caching/metadata.cc b/caching/metadata.cc index 91806f4..7b150be 100644 --- a/caching/metadata.cc +++ b/caching/metadata.cc @@ -128,6 +128,10 @@ void metadata::commit_mappings() { sb_.mapping_root = mappings_->get_root(); + if (sb_.version >= 2) { + dirty_bits_->flush(); + sb_.dirty_root = dirty_bits_->get_root(); + } } void