]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/journal_io.c
Update bcachefs sources to 367a8fad45 bcachefs: Reset journal flush delay to default...
[bcachefs-tools-debian] / libbcachefs / journal_io.c
index fca9bc47b889cee09a8faa32588d99e93de5aa77..e61b88930a7f007d872a8d120d0f7d7f7b899fed 100644 (file)
@@ -966,8 +966,16 @@ static void bch2_journal_read_device(struct closure *cl)
        }
        mutex_unlock(&jlist->lock);
 
-       BUG_ON(ja->bucket_seq[ja->cur_idx] &&
-              ja->sectors_free == ca->mi.bucket_size);
+       if (ja->bucket_seq[ja->cur_idx] &&
+           ja->sectors_free == ca->mi.bucket_size) {
+               bch_err(c, "ja->sectors_free == ca->mi.bucket_size");
+               bch_err(c, "cur_idx %u/%u", ja->cur_idx, ja->nr);
+               for (i = 0; i < 3; i++) {
+                       unsigned idx = ja->cur_idx - 1 + i;
+                       bch_err(c, "bucket_seq[%u] = %llu", idx, ja->bucket_seq[idx]);
+               }
+               ja->sectors_free = 0;
+       }
 
        /*
         * Set dirty_idx to indicate the entire journal is full and needs to be