This ability only makes sense as a step that allows to perform fsck before commiting recovered bluefs log.
Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
OPTION(bluefs_allocator, OPT_STR) // stupid | bitmap
OPTION(bluefs_preextend_wal_files, OPT_BOOL) // this *requires* that rocksdb has recycling enabled
OPTION(bluefs_replay_recovery, OPT_BOOL)
+OPTION(bluefs_replay_recovery_disable_compact, OPT_BOOL)
OPTION(bluestore_bluefs, OPT_BOOL)
OPTION(bluestore_bluefs_env_mirror, OPT_BOOL) // mirror to normal Env for debug
"This options enables heuristics that scans devices for missing data. "
"DO NOT ENABLE BY DEFAULT"),
+ Option("bluefs_replay_recovery_disable_compact", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
+ .set_default(false)
+ .set_description(""),
+
Option("bluestore_bluefs", Option::TYPE_BOOL, Option::LEVEL_DEV)
.set_default(true)
.add_tag("mkfs")
void BlueFS::compact_log()
{
std::unique_lock<std::mutex> l(lock);
- if (cct->_conf->bluefs_compact_log_sync) {
- _compact_log_sync();
- } else {
- _compact_log_async(l);
+ if (!cct->_conf->bluefs_replay_recovery_disable_compact) {
+ if (cct->_conf->bluefs_compact_log_sync) {
+ _compact_log_sync();
+ } else {
+ _compact_log_async(l);
+ }
}
}
utime_t end = ceph_clock_now();
utime_t dur = end - start;
dout(10) << __func__ << " done in " << dur << dendl;
- }
-
- if (_should_compact_log()) {
- if (cct->_conf->bluefs_compact_log_sync) {
- _compact_log_sync();
- } else {
- _compact_log_async(l);
+ if (!cct->_conf->bluefs_replay_recovery_disable_compact) {
+ if (_should_compact_log()) {
+ if (cct->_conf->bluefs_compact_log_sync) {
+ _compact_log_sync();
+ } else {
+ _compact_log_async(l);
+ }
+ }
}
}
}