diff options
author | Samuel Just <sam.just@inktank.com> | 2013-09-30 15:54:27 -0700 |
---|---|---|
committer | Samuel Just <sam.just@inktank.com> | 2013-10-04 13:50:09 -0700 |
commit | 0c2769d3321bff6e85ec57c85a08ee0b8e751bcb (patch) | |
tree | aa98596a999259b99cc722707c85ae302d5f75e0 | |
parent | 391a885f703543b18b8f03265e429b3315abfaea (diff) | |
download | ceph-0c2769d3321bff6e85ec57c85a08ee0b8e751bcb.tar.gz |
PGLog: on split, leave log head alone
This way last_update doesn't go backwards.
Fixes: 6447
Signed-off-by: Samuel Just <sam.just@inktank.com>
-rw-r--r-- | src/osd/PG.cc | 5 | ||||
-rw-r--r-- | src/osd/PGLog.cc | 4 |
2 files changed, 2 insertions, 7 deletions
diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 17a80708324..1d9ed5f6a31 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -2406,9 +2406,8 @@ void PG::log_weirdness() << " log bound mismatch, empty but (" << pg_log.get_tail() << "," << pg_log.get_head() << "]\n"; } else { - if ((pg_log.get_log().log.begin()->version <= pg_log.get_tail()) || // sloppy check - (pg_log.get_log().log.rbegin()->version != pg_log.get_head() && - !(pg_log.get_head() == pg_log.get_tail()))) + // sloppy check + if ((pg_log.get_log().log.begin()->version <= pg_log.get_tail())) osd->clog.error() << info.pgid << " log bound mismatch, info (" << pg_log.get_tail() << "," << pg_log.get_head() << "]" diff --git a/src/osd/PGLog.cc b/src/osd/PGLog.cc index 6e025f289bc..1949c96fd57 100644 --- a/src/osd/PGLog.cc +++ b/src/osd/PGLog.cc @@ -52,13 +52,9 @@ void PGLog::IndexedLog::split_into( if (log.empty()) tail = head; - else - head = log.rbegin()->version; if (olog->empty()) olog->tail = olog->head; - else - olog->head = olog->log.rbegin()->version; olog->index(); index(); |