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 D3973C761AF for ; Fri, 17 Mar 2023 09:10:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230180AbjCQJKN (ORCPT ); Fri, 17 Mar 2023 05:10:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231596AbjCQJJw (ORCPT ); Fri, 17 Mar 2023 05:09:52 -0400 Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C442E144A8 for ; Fri, 17 Mar 2023 02:09:34 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4PdJGx0VZmz4f3l79 for ; Fri, 17 Mar 2023 17:09:29 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.104.170]) by APP4 (Coremail) with SMTP id gCh0CgAHcLNGLhRk8RgkFg--.44000S4; Fri, 17 Mar 2023 17:09:29 +0800 (CST) From: Zhang Yi To: linux-ext4@vger.kernel.org Cc: tytso@mit.edu, adilger.kernel@dilger.ca, jack@suse.cz, yi.zhang@huawei.com, yi.zhang@huaweicloud.com, yukuai3@huawei.com Subject: [PATCH v4 0/2] ext4, jbd2: journal cycled record transactions between each mount Date: Fri, 17 Mar 2023 17:09:24 +0800 Message-Id: <20230317090926.4149399-1-yi.zhang@huaweicloud.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: gCh0CgAHcLNGLhRk8RgkFg--.44000S4 X-Coremail-Antispam: 1UD129KBjvJXoW7tFy7ZFy7ArWfXFykGw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ger.kernel.org From: Zhang Yi v3->v4: - Remove journal_cycle_record mount option, always enable it on ext4. v2->v3: - Prevent warning if mount old image with journal_cycle_record enabled. - Limit this mount option into ext4 iamge only. v1->v2: - Fix the format type warning. - Add more check of journal_cycle_record mount options in remount. Hello! This patch set is the fourth edition of the journal_cycle_record mount option. It save journal head for a clean unmounted file system in the journal super block, which could let us record journal transactions between each mount continuously. It could help us to do journal backtrack and find root cause from a corrupted filesystem. Current filesystem's corruption analysis is difficult and less useful information, especially on the real products. It is useful to some extent, especially for the cases of doing fuzzy tests and deploy in some shout-runing products. I will send out the corresponding e2fsprogs part v2 separately, all of these have done below test cases and also passed xfstests in auto mode. - Mount a filesystem with empty journal. - Mount a filesystem with journal ended in an unrecovered complete transaction. - Mount a filesystem with journal ended in an incomplete transaction. - Mount a corrupted filesystem with out of bound journal s_head. - Mount old filesystem without journal s_head set. Any comments are welcome. Thanks! Yi. v3: https://lore.kernel.org/linux-ext4/20230314140522.3266591-1-yi.zhang@huaweicloud.com/ v2: https://lore.kernel.org/linux-ext4/20230202142224.3679549-1-yi.zhang@huawei.com/ v1: https://lore.kernel.org/linux-ext4/20230119034600.3431194-3-yi.zhang@huaweicloud.com/ Zhang Yi (2): jbd2: continue to record log between each mount ext4: add journal cycled recording support fs/ext4/super.c | 5 +++++ fs/jbd2/journal.c | 18 ++++++++++++++++-- fs/jbd2/recovery.c | 22 +++++++++++++++++----- include/linux/jbd2.h | 9 +++++++-- 4 files changed, 45 insertions(+), 9 deletions(-) -- 2.31.1