From 45b257013e486b84b2487bec00027f9cf165861c Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Tue, 11 Oct 2016 19:14:38 +0800 Subject: [PATCH] os/bluestore: don't scan omap kvpair during fsck() Because it does not check anything, and removing it can speed up the process of fsck() Signed-off-by: xie xingguo --- src/os/bluestore/BlueStore.cc | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 5d53f227c6f0a..2da1633c090e7 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -4344,30 +4344,6 @@ int BlueStore::fsck() break; } used_omap_head.insert(o->onode.omap_head); - // hrm, scan actual key/value pairs? - KeyValueDB::Iterator it = db->get_iterator(PREFIX_OMAP); - if (!it) - break; - string head, tail; - get_omap_header(o->onode.omap_head, &head); - get_omap_tail(o->onode.omap_head, &tail); - it->lower_bound(head); - while (it->valid()) { - if (it->key() == head) { - dout(30) << __func__ << " got header" << dendl; - } else if (it->key() >= tail) { - dout(30) << __func__ << " reached tail" << dendl; - break; - } else { - string user_key; - decode_omap_key(it->key(), &user_key); - dout(30) << __func__ - << " got " << pretty_binary_string(it->key()) - << " -> " << user_key << dendl; - } - it->next(); - } - break; } } } -- 2.39.5