From e3b7d825696c23c23f6bd867de4dbda69be38db8 Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Mon, 13 Nov 2017 14:02:16 +0000 Subject: [PATCH] [cache_restore] v2 dirty bitset root wasn't being written to superblock. Resulting in corrupt restored data. --- caching/metadata.cc | 4 ++++ 1 file changed, 4 insertions(+) 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