]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
PGLog: on split, leave log head alone
authorSamuel Just <sam.just@inktank.com>
Mon, 30 Sep 2013 22:54:27 +0000 (15:54 -0700)
committerSamuel Just <sam.just@inktank.com>
Fri, 28 Mar 2014 22:34:42 +0000 (15:34 -0700)
This way last_update doesn't go backwards.

Fixes: 6447
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 0c2769d3321bff6e85ec57c85a08ee0b8e751bcb)

src/osd/PG.cc
src/osd/PGLog.cc

index 2b4f4f20445f6f5137421559a0849bf60b0c917c..77275483d8ea2a1a8f2bfda64510188b6e49df7a 100644 (file)
@@ -2483,9 +2483,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() << "]"
index a6e538c75e75eac51b9a1b993b2be69bda60fba4..4b33479cb2cc6200be7f987cb462d6c379ea6bfd 100644 (file)
@@ -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();