From: Danny Al-Gaaf Date: Fri, 1 Mar 2013 16:14:53 +0000 (+0100) Subject: osd/PG.cc: reduce scope of listed_collection in read_log_old() X-Git-Tag: v0.59~54^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=79569f7d3b0fdd61cb8aef66bd598aa5c4e7fc8f;p=ceph.git osd/PG.cc: reduce scope of listed_collection in read_log_old() Signed-off-by: Danny Al-Gaaf --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 7f9b4ba16b9d..90e6c0fcd5db 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -5208,7 +5208,6 @@ void PG::read_log_old(ObjectStore *store, coll_t coll, hobject_t log_oid, // In case of sobject_t based encoding, may need to list objects in the store // to find hashes - bool listed_collection = false; vector ls; if (ondisklog_head > 0) { @@ -5228,6 +5227,8 @@ void PG::read_log_old(ObjectStore *store, coll_t coll, hobject_t log_oid, assert(log.empty()); eversion_t last; bool reorder = false; + bool listed_collection = false; + while (!p.end()) { uint64_t pos = ondisklog_tail + p.get_off(); if (ondisklog_has_checksums) {