]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Add backend check option to KeyValueStore
authorHaomai Wang <haomaiwang@gmail.com>
Fri, 21 Feb 2014 14:33:58 +0000 (22:33 +0800)
committerHaomai Wang <haomaiwang@gmail.com>
Sat, 22 Feb 2014 13:05:01 +0000 (21:05 +0800)
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
src/common/config_opts.h
src/os/KeyValueStore.cc

index a9ea73d8a0c5f4f4ff5516254b1c77ca4c02d79c..b2cffc7508e3a7ba6fcbd0daa75a081174e4ed89 100644 (file)
@@ -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)
index fe92e9633822fe79e1e6f68dfa57861f735e38f8..36ff9d64515ed90a2d361f068f56059be22917e2 100644 (file)
@@ -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<ghobject_t>::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();