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-01 12:36:30 -0700 |
commit | 459d1e295301d6bce1313dcd8b1eeb9becd6a4bc (patch) | |
tree | cfc0c744ceba5ce83fde4c8fb3190a0006b4c7e5 | |
parent | 1769d619ec2e87b5a2d4bc674630d26ce957c581 (diff) | |
download | ceph-459d1e295301d6bce1313dcd8b1eeb9becd6a4bc.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(); |