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 6036DC6FD1C for ; Tue, 14 Mar 2023 14:12:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230224AbjCNOMO (ORCPT ); Tue, 14 Mar 2023 10:12:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231717AbjCNOL7 (ORCPT ); Tue, 14 Mar 2023 10:11:59 -0400 Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC038A72A5 for ; Tue, 14 Mar 2023 07:11:35 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4Pbb6N3cXMz4f3pFw for ; Tue, 14 Mar 2023 22:11:08 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.104.170]) by APP4 (Coremail) with SMTP id gCh0CgD3X7NygBBkPBlyFQ--.57348S4; Tue, 14 Mar 2023 22:11:09 +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 0/4] e2fsprogs: journal cycled record transactions between each mount Date: Tue, 14 Mar 2023 22:10:54 +0800 Message-Id: <20230314141058.3267404-1-yi.zhang@huaweicloud.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: gCh0CgD3X7NygBBkPBlyFQ--.57348S4 X-Coremail-Antispam: 1UD129KBjvdXoW7JF45JFW7AF17CF1kZw43Jrb_yoWD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org From: Zhang Yi Hello! This is the e2fsprogs part of the ext4 journal_cycle_record mount option(corresponding kernel part is at [1]). It add a new parameter to record the journal head of a clean filesystem, mke2fs initialize it to the start of journal area, and e2fsck check and fix it if it's bad, and also update it after recovering journal. Basic functional tests have been passed. Thanks, Yi. [1] https://lore.kernel.org/linux-ext4/20230314140522.3266591-1-yi.zhang@huaweicloud.com/T/#t Zhang Yi (4): lib/ext2fs: record and show journal head block debugfs/e2fsck: update the journal head block after recovery debugfs/e2fsck: check bad s_head block number ext4.5: document the journal_cycle_record mount options debugfs/journal.c | 10 +++++++++- e2fsck/journal.c | 15 ++++++++++++++- e2fsck/recovery.c | 21 +++++++++++++++++---- lib/e2p/ljs.c | 3 +++ lib/ext2fs/kernel-jbd.h | 6 ++++-- lib/ext2fs/mkjournal.c | 1 + misc/ext4.5.in | 6 ++++++ 7 files changed, 54 insertions(+), 8 deletions(-) -- 2.31.1