From patchwork Fri Mar 10 12:52:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhihao Cheng X-Patchwork-Id: 6409 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp859598wrd; Fri, 10 Mar 2023 05:06:28 -0800 (PST) X-Google-Smtp-Source: AK7set9xXXzMhTzFWdnxQ+qCi3r/8aszyhOTGA+rokqj8/aFOajDuuO1DCOytdTducSaURntkiDf X-Received: by 2002:a17:902:f7c7:b0:19e:bad6:273f with SMTP id h7-20020a170902f7c700b0019ebad6273fmr16791993plw.27.1678453588525; Fri, 10 Mar 2023 05:06:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678453588; cv=none; d=google.com; s=arc-20160816; b=g6EjVmc/WMXLUgK86RfGUoRSn1D2f6SJ3rt27QPHfeUDl1FuWAG3wyFy5EF+fjkvvx YJRpFeGrqG1CUxIFUhp8KqiLCGAv93mPzgE76z0d17EPsca+t0KUjiLJZpovTOvOhaxZ cIbzjFHIL+Hs1k1eGxYKT2Y7jKls3rEp4zyyy8JLVC1usZUAK04hlErZzrPSX2DLKhug Q5mNsgo4VHHtfV+hjvspYrCRg+0bOWnY3I0BPDjqbEpOrBLgkrtsnRiphPap280mkSJ5 qkpJGPVgAjzOP0HVsrXiXf7s0dRGLaFEu6IiChoPqbQWxufiGqd/J/eZ1mVgFIWW8U++ teaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=GOye7CNAfHVxt5wbDhYf2F5cRj2vzzZq5ppxNEnTLCQ=; b=BsAsdVnbdhbWPvDHGRD1qg9kD6XyM2wyZAzjBFXS8haMiSnO8vnRXnxWJlYZ6xXI+R N7zGeptflZIUM1c+KOJoZJJZiyAsG7qIKHkuwjC5SSYPfHafIIXrj5Ke3P9SAE+j7jje DTxag1r6KyVC8PKJqzvDzhDXYxNnHSoFWln12KJJy3leqnIE56+K3AjYU84JRMR6rAw1 PuL0LK0tfoYelt9OcWBlJs6g7t7pBM5m38wzz8LXIPx9X4DBK0y+9TH9124kie0pJjcr DOD6+BxK1pUyQOtoyYD6kBwY5X/hSlZhJBOFAPlYvxsUe6y8XHgYYedh4jeps/xVSg7M Y7Sg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c3-20020a170902d48300b0019e30e3066bsi2167841plg.286.2023.03.10.05.06.16; Fri, 10 Mar 2023 05:06:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230229AbjCJMw7 (ORCPT + 99 others); Fri, 10 Mar 2023 07:52:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230104AbjCJMwz (ORCPT ); Fri, 10 Mar 2023 07:52:55 -0500 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 479DE10D773; Fri, 10 Mar 2023 04:52:52 -0800 (PST) Received: from kwepemm600013.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4PY5VG3Kb4zSkkd; Fri, 10 Mar 2023 20:49:42 +0800 (CST) Received: from huawei.com (10.175.127.227) by kwepemm600013.china.huawei.com (7.193.23.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Fri, 10 Mar 2023 20:52:49 +0800 From: Zhihao Cheng To: , , CC: , , , Subject: [PATCH 0/5] ext4: Fix stale buffer loading from last failed Date: Fri, 10 Mar 2023 20:52:01 +0800 Message-ID: <20230310125206.2867822-1-chengzhihao1@huawei.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemm600013.china.huawei.com (7.193.23.68) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759986150039539347?= X-GMAIL-MSGID: =?utf-8?q?1759986150039539347?= Patch 1 fixes reusing stale buffer heads from last failed mounting. Patch 2~4 reconstructs 'j_format_version' initialization and checking in loading process. Zhang Yi (4): jbd2: remove unused feature macros jbd2: switch to check format version in superblock directly jbd2: factor out journal initialization from journal_get_superblock() jbd2: remove j_format_version Zhihao Cheng (1): ext4: Fix reusing stale buffer heads from last failed mounting fs/ext4/super.c | 15 +++++------ fs/jbd2/journal.c | 59 +++++++++++++++----------------------------- include/linux/jbd2.h | 33 +++++++++++-------------- 3 files changed, 42 insertions(+), 65 deletions(-)