From: Samuel Just Date: Thu, 17 Apr 2014 01:02:27 +0000 (-0700) Subject: ReplicatedPG::hit_set_persist: clean up degraded check X-Git-Tag: v0.80-rc1~13^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1fb90c94b30f3d0794df4e2b4e19d6ade9fd9a55;p=ceph.git ReplicatedPG::hit_set_persist: clean up degraded check Signed-off-by: Samuel Just --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 64e2f3d04733..5ca31e4c6ee9 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -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::iterator p = info.hit_set.history.begin(); - assert(p != info.hit_set.history.end()); + for (list::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))