]> git.apps.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, 4 Oct 2013 20:50:09 +0000 (13:50 -0700)
This way last_update doesn't go backwards.

Fixes: 6447
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/PG.cc
src/osd/PGLog.cc

index 17a8070832475cb0574f3e1b4755f45dcd7680c9..1d9ed5f6a31a3ccd0ee20232167a557402113be2 100644 (file)
@@ -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() << "]"
index 6e025f289bc9999be6be95879b741fda0927d3e4..1949c96fd57d1350edf4690d2c0983b6ceb222d4 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();