From nobody Sun Feb 8 02:39:19 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38EEDC83F3E for ; Mon, 4 Sep 2023 01:14:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350334AbjIDBO3 (ORCPT ); Sun, 3 Sep 2023 21:14:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349864AbjIDBOY (ORCPT ); Sun, 3 Sep 2023 21:14:24 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C908DE; Sun, 3 Sep 2023 18:14:15 -0700 (PDT) Received: from canpemm500010.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Rf9Zh1zSzzVk5K; Mon, 4 Sep 2023 09:11:40 +0800 (CST) Received: from huawei.com (10.175.127.227) by canpemm500010.china.huawei.com (7.192.105.118) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Mon, 4 Sep 2023 09:14:13 +0800 From: Ye Bin To: , , CC: , , Ye Bin Subject: [PATCH 1/2] JBD2: print io_block if check data block checksum failed when do recovery Date: Mon, 4 Sep 2023 09:10:20 +0800 Message-ID: <20230904011021.3884879-2-yebin10@huawei.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230904011021.3884879-1-yebin10@huawei.com> References: <20230904011021.3884879-1-yebin10@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To canpemm500010.china.huawei.com (7.192.105.118) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 transact= ion. 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 Reviewed-by: Jan Kara --- 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..a2e2bdaed9f8 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); + "log %lu\n", blocknr, + io_block); block_error =3D 1; goto skip_write; } --=20 2.31.1 From nobody Sun Feb 8 02:39:19 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D337C71153 for ; Mon, 4 Sep 2023 01:14:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350303AbjIDBOZ (ORCPT ); Sun, 3 Sep 2023 21:14:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231252AbjIDBOY (ORCPT ); Sun, 3 Sep 2023 21:14:24 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC38BED; Sun, 3 Sep 2023 18:14:15 -0700 (PDT) Received: from canpemm500010.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Rf9YQ4d4pzNmdG; Mon, 4 Sep 2023 09:10:34 +0800 (CST) Received: from huawei.com (10.175.127.227) by canpemm500010.china.huawei.com (7.192.105.118) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Mon, 4 Sep 2023 09:14:13 +0800 From: Ye Bin To: , , CC: , , Ye Bin Subject: [PATCH 2/2] JBD2: fix printk format type for 'io_block' in do_one_pass() Date: Mon, 4 Sep 2023 09:10:21 +0800 Message-ID: <20230904011021.3884879-3-yebin10@huawei.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230904011021.3884879-1-yebin10@huawei.com> References: <20230904011021.3884879-1-yebin10@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To canpemm500010.china.huawei.com (7.192.105.118) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 'io_block' is unsinged long but print it by '%ld'. Signed-off-by: Ye Bin Reviewed-by: Jan Kara --- 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 a2e2bdaed9f8..d10dc7f64301 100644 --- a/fs/jbd2/recovery.c +++ b/fs/jbd2/recovery.c @@ -632,7 +632,7 @@ static int do_one_pass(journal_t *journal, success =3D 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; --=20 2.31.1