]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: fix forced backfill when last_backfill sort order doesn't match
authorSage Weil <sage@redhat.com>
Wed, 29 Jul 2015 14:44:15 +0000 (10:44 -0400)
committerSage Weil <sage@redhat.com>
Fri, 7 Aug 2015 14:16:06 +0000 (10:16 -0400)
We need to force a backfill restart even if last_update is up to date.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PG.cc

index 2b657797e3bd32da62957ae87e8478707cb25108..a4c8c42dea6196a7db8b3d8ef136b9fe33ffa47b 100644 (file)
@@ -1616,7 +1616,15 @@ void PG::activate(ObjectStore::Transaction& t,
 
       bool needs_past_intervals = pi.dne();
 
-      if (pi.last_update == info.last_update) {
+      /*
+       * cover case where peer sort order was different and
+       * last_backfill cannot be interpreted
+       */
+      bool force_restart_backfill =
+       !pi.last_backfill.is_max() &&
+       pi.last_backfill_bitwise != get_sort_bitwise();
+
+      if (pi.last_update == info.last_update && !force_restart_backfill) {
         // empty log
        if (!pi.last_backfill.is_max())
          osd->clog->info() << info.pgid << " continuing backfill to osd."
@@ -1643,10 +1651,7 @@ void PG::activate(ObjectStore::Transaction& t,
       } else if (
        pg_log.get_tail() > pi.last_update ||
        pi.last_backfill == hobject_t() ||
-       (pi.last_backfill != hobject_t::get_max() &&
-        pi.last_backfill_bitwise != get_sort_bitwise()) ||
-       /* ^ cover case where peer sort order was different and
-          last_backfill cannot be interpreted */
+       force_restart_backfill ||
        (backfill_targets.count(*i) && pi.last_backfill.is_max())) {
        /* ^ This last case covers a situation where a replica is not contiguous
         * with the auth_log, but is contiguous with this replica.  Reshuffling