]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG::hit_set_persist: clean up degraded check
authorSamuel Just <sam.just@inktank.com>
Thu, 17 Apr 2014 01:02:27 +0000 (18:02 -0700)
committerSamuel Just <sam.just@inktank.com>
Mon, 21 Apr 2014 17:46:11 +0000 (10:46 -0700)
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/ReplicatedPG.cc

index 64e2f3d04733ebb78ffc3014fe1b20189c69fee1..5ca31e4c6ee9bb33ebe4f11d4d96efd15f79b1ff 100644 (file)
@@ -10508,15 +10508,16 @@ void ReplicatedPG::hit_set_persist()
 
   // If any archives are degraded we skip this persist request
   // account for the additional entry being added below
-  for (unsigned num = info.hit_set.history.size() + 1; num > max; --num) {
-    list<pg_hit_set_info_t>::iterator p = info.hit_set.history.begin();
-    assert(p != info.hit_set.history.end());
+  for (list<pg_hit_set_info_t>::iterator p = info.hit_set.history.begin();
+       p != info.hit_set.history.end();
+       ++p) {
     hobject_t aoid = get_hit_set_archive_object(p->begin, p->end);
 
     // Once we hit a degraded object just skip further trim
     if (is_degraded_object(aoid))
       return;
   }
+
   oid = get_hit_set_archive_object(start, now);
   // If the current object is degraded we skip this persist request
   if (is_degraded_object(oid))