From: xie xingguo Date: Thu, 14 Jul 2016 08:49:16 +0000 (+0800) Subject: os/bluestore: remove expecting_objects checking for stary bnode/onode X-Git-Tag: ses5-milestone5~362^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3325ab02b7f55eb0a00569387b960899f01490a0;p=ceph.git os/bluestore: remove expecting_objects checking for stary bnode/onode It actually never works for now and there is no easy way to do such check. Signed-off-by: xie xingguo --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 3e834e33d4ee..74df5b923492 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -3096,18 +3096,12 @@ int BlueStore::fsck() it = db->get_iterator(PREFIX_OBJ); if (it) { CollectionRef c; - bool expecting_objects = false; shard_id_t expecting_shard; int64_t expecting_pool; uint32_t expecting_hash; for (it->lower_bound(string()); it->valid(); it->next()) { ghobject_t oid; if (is_bnode_key(it->key())) { - if (expecting_objects) { - dout(30) << __func__ << " had bnode but no objects for 0x" - << std::hex << expecting_hash << std::dec << dendl; - ++errors; - } int r = get_key_bnode(it->key(), &expecting_shard, &expecting_pool, &expecting_hash); if (r < 0) { @@ -3117,6 +3111,7 @@ int BlueStore::fsck() } continue; } + int r = get_key_object(it->key(), &oid); if (r < 0) { dout(30) << __func__ << " bad object key " @@ -3124,14 +3119,7 @@ int BlueStore::fsck() ++errors; continue; } - if (expecting_objects) { - if (oid.hobj.get_bitwise_key_u32() != expecting_hash) { - dout(30) << __func__ << " had bnode but no objects for 0x" - << std::hex << expecting_hash << std::dec << dendl; - ++errors; - } - expecting_objects = false; - } + if (!c || !c->contains(oid)) { c = NULL; for (ceph::unordered_map::iterator p = @@ -3151,12 +3139,6 @@ int BlueStore::fsck() } } } - if (expecting_objects) { - dout(30) << __func__ << " had bnode but no objects for 0x" - << std::hex << expecting_hash << std::dec << dendl; - ++errors; - expecting_objects = false; - } } dout(1) << __func__ << " checking for stray omap data" << dendl;