From 697411c8e0f75342fc3c841d62f6b731cc765384 Mon Sep 17 00:00:00 2001 From: Haomai Wang Date: Fri, 21 Feb 2014 22:33:58 +0800 Subject: [PATCH] Add backend check option to KeyValueStore Signed-off-by: Haomai Wang --- src/common/config_opts.h | 1 + src/os/KeyValueStore.cc | 10 ++++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/common/config_opts.h b/src/common/config_opts.h index a9ea73d8a0c5..b2cffc7508e3 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -652,6 +652,7 @@ OPTION(journal_force_aio, OPT_BOOL, false) OPTION(keyvaluestore_queue_max_ops, OPT_INT, 50) OPTION(keyvaluestore_queue_max_bytes, OPT_INT, 100 << 20) +OPTION(keyvaluestore_check_backend, OPT_BOOL, 0) // Expensive debugging check on sync // max bytes to search ahead in journal searching for corruption OPTION(journal_max_corrupt_search, OPT_U64, 10<<20) diff --git a/src/os/KeyValueStore.cc b/src/os/KeyValueStore.cc index fe92e9633822..36ff9d64515e 100644 --- a/src/os/KeyValueStore.cc +++ b/src/os/KeyValueStore.cc @@ -865,7 +865,7 @@ int KeyValueStore::mount() } stringstream err2; - if (g_conf->filestore_debug_omap_check && !dbomap->check(err2)) { + if (g_conf->keyvaluestore_check_backend && !dbomap->check(err2)) { derr << err2.str() << dendl;; delete dbomap; ret = -EINVAL; @@ -2517,12 +2517,10 @@ int KeyValueStore::_collection_rename(const coll_t &cid, const coll_t &ncid, for (vector::iterator i = objects.begin(); i != objects.end(); ++i) { - if (i->match(bits, rem)) { - if (_collection_move_rename(cid, *i, ncid, *i, t) < 0) { - return -1; - } - move_size++; + if (_collection_move_rename(cid, *i, ncid, *i, t) < 0) { + return -1; } + move_size++; } objects.clear(); -- 2.47.3