summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2013-09-30 15:54:27 -0700
committerSamuel Just <sam.just@inktank.com>2013-10-04 13:50:09 -0700
commit0c2769d3321bff6e85ec57c85a08ee0b8e751bcb (patch)
treeaa98596a999259b99cc722707c85ae302d5f75e0
parent391a885f703543b18b8f03265e429b3315abfaea (diff)
downloadceph-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.cc5
-rw-r--r--src/osd/PGLog.cc4
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();