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 1E1ACC61DA4 for ; Thu, 2 Feb 2023 14:22:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232110AbjBBOWj (ORCPT ); Thu, 2 Feb 2023 09:22:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231904AbjBBOWi (ORCPT ); Thu, 2 Feb 2023 09:22:38 -0500 Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFCE11B564 for ; Thu, 2 Feb 2023 06:22:35 -0800 (PST) Received: from mail02.huawei.com (unknown [172.30.67.169]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4P71Fx60MSz4f3jZJ for ; Thu, 2 Feb 2023 22:22:29 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.104.170]) by APP4 (Coremail) with SMTP id gCh0CgCnD7Mgx9tjTJV+Cw--.129S4; Thu, 02 Feb 2023 22:22:30 +0800 (CST) From: Zhang Yi To: linux-ext4@vger.kernel.org Cc: tytso@mit.edu, adilger.kernel@dilger.ca, jack@suse.cz, harshadshirwadkar@gmail.com, yi.zhang@huawei.com, yi.zhang@huaweicloud.com, yukuai3@huawei.com Subject: [RFC PATCH v2 0/2] ext4, jbd2: journal cycled record transactions between each mounts Date: Thu, 2 Feb 2023 22:22:22 +0800 Message-Id: <20230202142224.3679549-1-yi.zhang@huawei.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: gCh0CgCnD7Mgx9tjTJV+Cw--.129S4 X-Coremail-Antispam: 1UD129KBj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M-SenderInfo: d1lo6xhdqjqx5xdzvxpfor3voofrz/ X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Zhang Yi v1->v2: - Fix the format type warning. - Add more check of journal_cycle_record mount options in remount. Hello, This patch set introduce a new mount option names journal_cycle_record, it save journal head for a clean unmounted file system, let ext4 continue/cycled record new journal transactions after previous mount or recovered transactions for unclean file system. It could give us more info when analysing a corrupted file system image and locate kernel consistency bugs more conveniently. This is just the kernel part and have already passed throuth xfstests in auto mode (it depends on one prefix patch[1]). I will continue the e2fsprogs' part if nobody strong dislike that. Any comments are welcome. [1] https://lore.kernel.org/linux-ext4/20230130111138.76tp6pij3yhh4brh@quack3/T/#m96a1cffd567bdd844233b3115a6635391ed0b45b Thanks, Yi. Zhang Yi (2): jbd2: cycled record log on clean journal logging area ext4: add journal cycled recording support fs/ext4/ext4.h | 2 ++ fs/ext4/super.c | 18 ++++++++++++++++++ fs/jbd2/journal.c | 18 ++++++++++++++++-- fs/jbd2/recovery.c | 22 +++++++++++++++++----- include/linux/jbd2.h | 9 +++++++-- 5 files changed, 60 insertions(+), 9 deletions(-) -- 2.31.1