diff options
author | Samuel Just <sam.just@inktank.com> | 2013-07-22 13:46:10 -0700 |
---|---|---|
committer | Samuel Just <sam.just@inktank.com> | 2013-07-22 15:09:48 -0700 |
commit | 566f8f6e002e02a1a3ca05b242e97e68b1e89504 (patch) | |
tree | a147594fa6e91327c96b70b71222bf191ecafbc0 | |
parent | a908c1e24abb6eb7e8083337dfc9b0d39bf45a19 (diff) | |
download | ceph-566f8f6e002e02a1a3ca05b242e97e68b1e89504.tar.gz |
PGLog::rewind_divergent_log: unindex only works from tail, index() instead
Fixes: #5714
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 6957dbc75cc2577652b542aa3eae69f03060cb63)
The original patch covered the same code in PGLog.cc.
Conflicts:
src/osd/PGLog.cc
src/osd/PG.cc
-rw-r--r-- | src/osd/PG.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 442795015f6..b547840a0f2 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<pg_log_entry_t>::iterator d = divergent.begin(); d != divergent.end(); ++d) merge_old_entry(t, *d); |