]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: PG::prior_set_affected: const cleanup
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Tue, 14 Dec 2010 09:53:37 +0000 (01:53 -0800)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Tue, 14 Dec 2010 09:53:37 +0000 (01:53 -0800)
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
src/osd/PG.cc
src/osd/PG.h

index 22a095476595b17a6779569c057c706bb912fcfb..3f4fad4b537c3556a7fc89594bc3c24bcd805098 100644 (file)
@@ -913,7 +913,7 @@ void PG::trim_past_intervals()
 
 
 // true if the given map affects the prior set
-bool PG::prior_set_affected(OSDMap *osdmap)
+bool PG::prior_set_affected(const OSDMap *osdmap) const
 {
   for (set<int>::iterator p = prior_set.begin();
        p != prior_set.end();
@@ -960,9 +960,9 @@ bool PG::prior_set_affected(OSDMap *osdmap)
   }
   
   // did a significant osd's up_thru change?
-  for (map<int,epoch_t>::iterator p = prior_set_up_thru.begin();
+  for (map<int,epoch_t>::const_iterator p = prior_set_up_thru.begin();
        p != prior_set_up_thru.end();
-       p++)
+       ++p)
     if (p->second != osdmap->get_up_thru(p->first)) {
       dout(10) << "prior_set_affected: primary osd" << p->first
               << " up_thru " << p->second
index 502aec4353ff79bab91c610d41c07cb3987028c3..e8bda5f6ffb8b7fb9b9c75898ad2f20fcb27ff3a 100644 (file)
@@ -804,7 +804,7 @@ public:
   void trim_past_intervals();
   void build_prior();
   void clear_prior();
-  bool prior_set_affected(OSDMap *map);
+  bool prior_set_affected(const OSDMap *map) const;
 
 
   bool all_unfound_are_lost(const OSDMap* osdmap) const;