From: xie xingguo Date: Tue, 26 Jan 2016 09:25:42 +0000 (+0800) Subject: BlueStore: try to scan as many errors as possible X-Git-Tag: v10.0.4~75^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9bc0c31613a5eefce894c842be5a158a85bc72a1;p=ceph.git BlueStore: try to scan as many errors as possible Signed-off-by: xie xingguo --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 480b60d5ed8d..c9181bc81147 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -1945,13 +1945,13 @@ int BlueStore::fsck() // walk collections, objects for (ceph::unordered_map::iterator p = coll_map.begin(); - p != coll_map.end() && !errors; + p != coll_map.end(); ++p) { dout(1) << __func__ << " collection " << p->first << dendl; CollectionRef c = _get_collection(p->first); RWLock::RLocker l(c->lock); ghobject_t pos; - while (!errors) { + while (true) { vector ols; int r = collection_list(p->first, pos, ghobject_t::get_max(), true, 100, &ols, &pos); @@ -1967,7 +1967,7 @@ int BlueStore::fsck() OnodeRef o = c->get_onode(oid, false); if (!o || !o->exists) { ++errors; - break; + continue; // go for next object } if (!enode || enode->hash != o->oid.hobj.get_hash()) { if (enode) @@ -1980,7 +1980,7 @@ int BlueStore::fsck() derr << " " << oid << " nid " << o->onode.nid << " already in use" << dendl; ++errors; - break; + continue; // go for next object } used_nids.insert(o->onode.nid); } @@ -2129,7 +2129,7 @@ int BlueStore::fsck() c = NULL; for (ceph::unordered_map::iterator p = coll_map.begin(); - p != coll_map.end() && !errors; + p != coll_map.end(); ++p) { if (p->second->contains(oid)) { c = p->second;