]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: FileJournal::read_entry() can't use a zero seq to check for corruption
authorDavid Zafman <dzafman@redhat.com>
Fri, 6 Feb 2015 02:40:25 +0000 (18:40 -0800)
committerDavid Zafman <dzafman@redhat.com>
Thu, 25 Feb 2016 20:50:21 +0000 (12:50 -0800)
Seen when using dump() on a journal which has all entries committed

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit a7cda53d20eb6d35203fce6ec9f7ea1df432bf53)

src/os/FileJournal.cc

index 2c8fe75112436d7dc974aaa68db3be08414c3a15..d0b9563def06d74c2a8499b979f52944f7a78553 100644 (file)
@@ -1778,7 +1778,7 @@ bool FileJournal::read_entry(
   }
 
   stringstream errss;
-  if (seq < header.committed_up_to) {
+  if (seq && seq < header.committed_up_to) {
     derr << "Unable to read past sequence " << seq
         << " but header indicates the journal has committed up through "
         << header.committed_up_to << ", journal is corrupt" << dendl;