OPTION(bluestore_no_per_pool_stats_tolerance, OPT_STR)
OPTION(bluestore_warn_on_bluefs_spillover, OPT_BOOL)
OPTION(bluestore_warn_on_legacy_statfs, OPT_BOOL)
+OPTION(bluestore_fsck_error_on_no_per_pool_omap, OPT_BOOL)
OPTION(bluestore_log_op_age, OPT_DOUBLE)
OPTION(bluestore_log_omap_iterator_age, OPT_DOUBLE)
OPTION(bluestore_log_collection_list_age, OPT_DOUBLE)
.set_default(true)
.set_description("Enable health indication on lack of per-pool statfs reporting from bluestore"),
+ Option("bluestore_fsck_error_on_no_per_pool_omap", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
+ .set_default(false)
+ .set_description("Make fsck error (instead of warn) when objects without per-pool omap are found"),
+
Option("bluestore_log_op_age", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
.set_default(5)
.set_description("log operation if it's slower than this age (seconds)"),
<< (repair ? " repair" : " check")
<< (deep ? " (deep)" : " (shallow)") << " start" << dendl;
int64_t errors = 0;
+ int64_t warnings = 0;
unsigned repaired = 0;
typedef btree::btree_set<
}
if (!per_pool_omap) {
- derr << "fsck error: store not yet converted to per-pool omap" << dendl;
- ++errors;
+ const char *w;
+ if (cct->_conf->bluestore_fsck_error_on_no_per_pool_omap) {
+ w = "error";
+ ++errors;
+ } else {
+ w = "warning";
+ ++warnings;
+ }
+ derr << "fsck " << w << ": store not yet converted to per-pool omap"
+ << dendl;
if (repair) {
repairer.fix_per_pool_omap(db);
}
} else {
m.insert(o->onode.nid);
}
- if (per_pool_omap &&
- (!o->onode.is_perpool_omap() && !o->onode.is_pgmeta_omap())) {
- derr << "fsck error: " << oid << " has omap that is not per-pool or pgmeta"
- << dendl;
- ++errors;
+ if (!o->onode.is_perpool_omap() && !o->onode.is_pgmeta_omap()) {
+ if (per_pool_omap) {
+ derr << "fsck error: " << oid
+ << " has omap that is not per-pool or pgmeta" << dendl;
+ ++errors;
+ } else {
+ const char *w;
+ if (cct->_conf->bluestore_fsck_error_on_no_per_pool_omap) {
+ ++errors;
+ w = "error";
+ } else {
+ ++warnings;
+ w = "warning";
+ }
+ derr << "fsck " << w << ": " << oid
+ << " has omap that is not per-pool or pgmeta" << dendl;
+ }
}
if (repair &&
o->onode.has_omap() &&
<< dendl;
utime_t duration = ceph_clock_now() - start;
- dout(1) << __func__ << " <<<FINISH>>> with " << errors << " errors, " << repaired
- << " repaired, " << (errors - (int)repaired) << " remaining in "
+ dout(1) << __func__ << " <<<FINISH>>> with " << errors << " errors, "
+ << warnings << " warnings, "
+ << repaired << " repaired, "
+ << (errors + warnings - (int)repaired) << " remaining in "
<< duration << " seconds" << dendl;
return errors - (int)repaired;
}