]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore: add journal_replay check and debugging
authorSamuel Just <sjust@redhat.com>
Thu, 17 Sep 2020 22:15:43 +0000 (15:15 -0700)
committerSamuel Just <sjust@redhat.com>
Tue, 20 Oct 2020 19:27:08 +0000 (12:27 -0700)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/os/seastore/journal.cc

index f0be454976e168a027d1bac038711669c85d2811..ac910e58ad23d5c1f4cb16b89f269756fd425191 100644 (file)
@@ -225,6 +225,10 @@ Journal::find_replay_segments_fut Journal::find_replay_segments()
                i);
              return find_replay_segments_ertr::now();
            }
+           logger().debug(
+             "find_replay_segments: segment {} header {}",
+             i,
+             header);
            segments.emplace_back(i, std::move(header));
            return find_replay_segments_ertr::now();
          }).handle_error(
@@ -271,6 +275,13 @@ Journal::find_replay_segments_fut Journal::find_replay_segments()
              [&replay_from](const auto &seg) -> bool {
                return seg.first == replay_from.segment;
              });
+           if (from->second.journal_segment_seq != journal_tail.segment_seq) {
+             logger().error(
+               "find_replay_segments: journal_tail {} does not match {}",
+               journal_tail,
+               from->second);
+             assert(0 == "invalid");
+           }
          } else {
            replay_from = paddr_t{from->first, (segment_off_t)block_size};
          }