]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
jbd2: print io_block if check data block checksum failed when do recovery
authorYe Bin <yebin10@huawei.com>
Mon, 4 Sep 2023 10:58:16 +0000 (18:58 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 6 Oct 2023 02:32:15 +0000 (22:32 -0400)
Now, if check data block checksum failed only print data's block number
then skip write data. However, one data block may in more than one transaction.
In some scenarios, offline analysis is inconvenient. As a result, it is
difficult to locate the areas where data is faulty.
So print 'io_block' if check data block checksum failed.

Signed-off-by: Ye Bin <yebin10@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230904105817.1728356-2-yebin10@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/jbd2/recovery.c

index c269a7d29a46533ca107492d067657debaf7506c..11380ff1fe51aa30ef575a07173686bb8bab5ec1 100644 (file)
@@ -661,7 +661,8 @@ static int do_one_pass(journal_t *journal,
                                                printk(KERN_ERR "JBD2: Invalid "
                                                       "checksum recovering "
                                                       "data block %llu in "
-                                                      "log\n", blocknr);
+                                                      "journal block %lu\n",
+                                                      blocknr, io_block);
                                                block_error = 1;
                                                goto skip_write;
                                        }