From: Sage Weil Date: Mon, 17 Apr 2017 14:01:45 +0000 (-0400) Subject: osd/PG: clear past_intervals as needed on upgrade X-Git-Tag: v12.0.3~129^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a2d2232f3935bec2facdc151851e664839f75076;p=ceph.git osd/PG: clear past_intervals as needed on upgrade Signed-off-by: Sage Weil --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 25fb632aaaf..76759c0f576 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -2766,13 +2766,6 @@ void PG::upgrade(ObjectStore *store) assert(info_struct_v >= 7); - // no special action needed for 9->10, just write out the biginfo - - // 8 -> 9 - if (info_struct_v <= 8) { - // no special action needed. - } - // 7 -> 8 if (info_struct_v <= 7) { pg_log.mark_log_for_rewrite(); @@ -2788,6 +2781,20 @@ void PG::upgrade(ObjectStore *store) t.omap_setkeys(coll, pgmeta_oid, v); } + // 8 -> 9 + if (info_struct_v <= 8) { + // no special action needed. + } + + // 9 -> 10 + if (info_struct_v <= 9) { + // previous versions weren't (as) aggressively clearing past_intervals + if (info.history.last_epoch_clean >= info.history.same_interval_since) { + dout(20) << __func__ << " clearing past_intervals" << dendl; + past_intervals.clear(); + } + } + dirty_info = true; dirty_big_info = true; write_if_dirty(t);