From d2b401ca5ac047ab36990c1a4f4895fcb96b9071 Mon Sep 17 00:00:00 2001 From: Igor Fedotov Date: Mon, 11 Nov 2019 02:35:04 +0300 Subject: [PATCH] os/bluestore: check bluefs allocations when replaying log Signed-off-by: Igor Fedotov --- src/common/legacy_config_opts.h | 1 + src/common/options.cc | 4 + src/os/bluestore/BlueFS.cc | 130 ++++++++++++++++++++++++++-- src/os/bluestore/BlueFS.h | 2 + src/test/objectstore/test_bluefs.cc | 55 ++++++++++++ 5 files changed, 183 insertions(+), 9 deletions(-) diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index a30e206fd5c..4fc78c79c83 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -912,6 +912,7 @@ OPTION(bluefs_buffered_io, OPT_BOOL) OPTION(bluefs_sync_write, OPT_BOOL) OPTION(bluefs_allocator, OPT_STR) // stupid | bitmap OPTION(bluefs_preextend_wal_files, OPT_BOOL) // this *requires* that rocksdb has recycling enabled +OPTION(bluefs_log_replay_check_allocations, OPT_BOOL) OPTION(bluestore_bluefs, OPT_BOOL) OPTION(bluestore_bluefs_env_mirror, OPT_BOOL) // mirror to normal Env for debug diff --git a/src/common/options.cc b/src/common/options.cc index 046d62e916b..b4c8c28b4f8 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -3973,6 +3973,10 @@ std::vector