]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG.cc: reduce scope of listed_collection in read_log_old()
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 1 Mar 2013 16:14:53 +0000 (17:14 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 1 Mar 2013 16:14:53 +0000 (17:14 +0100)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/osd/PG.cc

index 7f9b4ba16b9de0fd58151a5dd502de7703c1234a..90e6c0fcd5db309bf27c7686d740ddf27acf31aa 100644 (file)
@@ -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<hobject_t> 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) {