* [PATCH v2 0/2] JBD2: print io_block if check data block checksum failed when do recovery
@ 2023-09-04 10:58 Ye Bin
2023-09-04 10:58 ` [PATCH v2 1/2] " Ye Bin
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ye Bin @ 2023-09-04 10:58 UTC (permalink / raw)
To: tytso, adilger.kernel, linux-ext4; +Cc: linux-kernel, jack, Ye Bin
Diff v2 vs v1:
Modify print information for the first patch according to Jan Kara's suggestion.
Ye Bin (2):
JBD2: print io_block if check data block checksum failed when do
recovery
JBD2: fix printk format type for 'io_block' in do_one_pass()
fs/jbd2/recovery.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--
2.31.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/2] JBD2: print io_block if check data block checksum failed when do recovery
2023-09-04 10:58 [PATCH v2 0/2] JBD2: print io_block if check data block checksum failed when do recovery Ye Bin
@ 2023-09-04 10:58 ` Ye Bin
2023-09-04 10:58 ` [PATCH v2 2/2] JBD2: fix printk format type for 'io_block' in do_one_pass() Ye Bin
2023-10-06 18:06 ` [PATCH v2 0/2] JBD2: print io_block if check data block checksum failed when do recovery Theodore Ts'o
2 siblings, 0 replies; 4+ messages in thread
From: Ye Bin @ 2023-09-04 10:58 UTC (permalink / raw)
To: tytso, adilger.kernel, linux-ext4; +Cc: linux-kernel, jack, Ye Bin
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>
---
fs/jbd2/recovery.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c
index c269a7d29a46..11380ff1fe51 100644
--- a/fs/jbd2/recovery.c
+++ b/fs/jbd2/recovery.c
@@ -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;
}
--
2.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] JBD2: fix printk format type for 'io_block' in do_one_pass()
2023-09-04 10:58 [PATCH v2 0/2] JBD2: print io_block if check data block checksum failed when do recovery Ye Bin
2023-09-04 10:58 ` [PATCH v2 1/2] " Ye Bin
@ 2023-09-04 10:58 ` Ye Bin
2023-10-06 18:06 ` [PATCH v2 0/2] JBD2: print io_block if check data block checksum failed when do recovery Theodore Ts'o
2 siblings, 0 replies; 4+ messages in thread
From: Ye Bin @ 2023-09-04 10:58 UTC (permalink / raw)
To: tytso, adilger.kernel, linux-ext4; +Cc: linux-kernel, jack, Ye Bin
'io_block' is unsinged long but print it by '%ld'.
Signed-off-by: Ye Bin <yebin10@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
---
fs/jbd2/recovery.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c
index 11380ff1fe51..0567f1aa189b 100644
--- a/fs/jbd2/recovery.c
+++ b/fs/jbd2/recovery.c
@@ -632,7 +632,7 @@ static int do_one_pass(journal_t *journal,
success = err;
printk(KERN_ERR
"JBD2: IO error %d recovering "
- "block %ld in log\n",
+ "block %lu in log\n",
err, io_block);
} else {
unsigned long long blocknr;
--
2.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 0/2] JBD2: print io_block if check data block checksum failed when do recovery
2023-09-04 10:58 [PATCH v2 0/2] JBD2: print io_block if check data block checksum failed when do recovery Ye Bin
2023-09-04 10:58 ` [PATCH v2 1/2] " Ye Bin
2023-09-04 10:58 ` [PATCH v2 2/2] JBD2: fix printk format type for 'io_block' in do_one_pass() Ye Bin
@ 2023-10-06 18:06 ` Theodore Ts'o
2 siblings, 0 replies; 4+ messages in thread
From: Theodore Ts'o @ 2023-10-06 18:06 UTC (permalink / raw)
To: adilger.kernel, linux-ext4, Ye Bin; +Cc: Theodore Ts'o, linux-kernel, jack
On Mon, 04 Sep 2023 18:58:15 +0800, Ye Bin wrote:
> Diff v2 vs v1:
> Modify print information for the first patch according to Jan Kara's suggestion.
>
> Ye Bin (2):
> JBD2: print io_block if check data block checksum failed when do
> recovery
> JBD2: fix printk format type for 'io_block' in do_one_pass()
>
> [...]
Applied, thanks!
[1/2] JBD2: print io_block if check data block checksum failed when do recovery
commit: 71cd5a5aa0607073adba3852739b7f8c22bc7b50
[2/2] JBD2: fix printk format type for 'io_block' in do_one_pass()
commit: 8b6b562121f1981315e76b6ae1f8a5cbbcf14bd7
Best regards,
--
Theodore Ts'o <tytso@mit.edu>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-10-06 18:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-04 10:58 [PATCH v2 0/2] JBD2: print io_block if check data block checksum failed when do recovery Ye Bin
2023-09-04 10:58 ` [PATCH v2 1/2] " Ye Bin
2023-09-04 10:58 ` [PATCH v2 2/2] JBD2: fix printk format type for 'io_block' in do_one_pass() Ye Bin
2023-10-06 18:06 ` [PATCH v2 0/2] JBD2: print io_block if check data block checksum failed when do recovery Theodore Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox