From nobody Sat Feb 7 16:48:40 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 2EF19C83F33 for ; Mon, 4 Sep 2023 11:02:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238032AbjIDLCS (ORCPT ); Mon, 4 Sep 2023 07:02:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243138AbjIDLCQ (ORCPT ); Mon, 4 Sep 2023 07:02:16 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8780191; Mon, 4 Sep 2023 04:02:11 -0700 (PDT) Received: from canpemm500010.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RfQdz72RtzrSWw; Mon, 4 Sep 2023 19:00:23 +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 19:02:09 +0800 From: Ye Bin To: , , CC: , , Ye Bin Subject: [PATCH v2 1/2] JBD2: print io_block if check data block checksum failed when do recovery Date: Mon, 4 Sep 2023 18:58:16 +0800 Message-ID: <20230904105817.1728356-2-yebin10@huawei.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230904105817.1728356-1-yebin10@huawei.com> References: <20230904105817.1728356-1-yebin10@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) 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..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 =3D 1; goto skip_write; } --=20 2.31.1 From nobody Sat Feb 7 16:48:40 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 4098EC71153 for ; Mon, 4 Sep 2023 11:02:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352763AbjIDLCT (ORCPT ); Mon, 4 Sep 2023 07:02:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236860AbjIDLCQ (ORCPT ); Mon, 4 Sep 2023 07:02:16 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4151C6; Mon, 4 Sep 2023 04:02:11 -0700 (PDT) Received: from canpemm500010.china.huawei.com (unknown [172.30.72.55]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4RfQcD1YFDz1DDZK; Mon, 4 Sep 2023 18:58:52 +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 19:02:09 +0800 From: Ye Bin To: , , CC: , , Ye Bin Subject: [PATCH v2 2/2] JBD2: fix printk format type for 'io_block' in do_one_pass() Date: Mon, 4 Sep 2023 18:58:17 +0800 Message-ID: <20230904105817.1728356-3-yebin10@huawei.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230904105817.1728356-1-yebin10@huawei.com> References: <20230904105817.1728356-1-yebin10@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) 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 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 =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