From: Samuel Just Date: Mon, 22 Jul 2013 20:46:10 +0000 (-0700) Subject: PGLog::rewind_divergent_log: unindex only works from tail, index() instead X-Git-Tag: v0.61.8~23^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7d98651775265896c22bacfc4afcfccbb0128470;p=ceph.git PGLog::rewind_divergent_log: unindex only works from tail, index() instead Fixes: #5714 Signed-off-by: Samuel Just Reviewed-by: Sage Weil (cherry picked from commit 6957dbc75cc2577652b542aa3eae69f03060cb63) The original patch covered the same code in PGLog.cc. Conflicts: src/osd/PGLog.cc src/osd/PG.cc --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 442795015f60..b547840a0f26 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -560,7 +560,6 @@ void PG::rewind_divergent_log(ObjectStore::Transaction& t, eversion_t newhead) } assert(p->version > newhead); dout(10) << "rewind_divergent_log future divergent " << *p << dendl; - log.unindex(*p); } log.head = newhead; @@ -568,6 +567,8 @@ void PG::rewind_divergent_log(ObjectStore::Transaction& t, eversion_t newhead) if (info.last_complete > newhead) info.last_complete = newhead; + log.index(); + for (list::iterator d = divergent.begin(); d != divergent.end(); ++d) merge_old_entry(t, *d);