From patchwork Wed Dec 13 01:32:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhihao Cheng X-Patchwork-Id: 1875408 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org (client-ip=2404:9400:2221:ea00::3; helo=gandalf.ozlabs.org; envelope-from=srs0=uozk=hy=vger.kernel.org=linux-ext4+bounces-419-patchwork-incoming=ozlabs.org@ozlabs.org; receiver=patchwork.ozlabs.org) Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Sqdkc21vzz1ySd for ; Wed, 13 Dec 2023 12:51:36 +1100 (AEDT) Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4Sqdkc1Y9Tz4wcX for ; Wed, 13 Dec 2023 12:51:36 +1100 (AEDT) Received: by gandalf.ozlabs.org (Postfix) id 4Sqdkc1VBxz4xCg; Wed, 13 Dec 2023 12:51:36 +1100 (AEDT) Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: gandalf.ozlabs.org; dmarc=fail (p=quarantine dis=none) header.from=huawei.com Authentication-Results: gandalf.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45e3:2400::1; helo=sv.mirrors.kernel.org; envelope-from=linux-ext4+bounces-419-patchwork-incoming=ozlabs.org@vger.kernel.org; receiver=ozlabs.org) Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [IPv6:2604:1380:45e3:2400::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by gandalf.ozlabs.org (Postfix) with ESMTPS id 4Sqdkc0KCHz4wcX for ; Wed, 13 Dec 2023 12:51:36 +1100 (AEDT) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A733F282483 for ; Wed, 13 Dec 2023 01:51:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A13B81391; Wed, 13 Dec 2023 01:51:29 +0000 (UTC) X-Original-To: linux-ext4@vger.kernel.org Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE068AD for ; Tue, 12 Dec 2023 17:51:24 -0800 (PST) Received: from mail.maildlp.com (unknown [172.19.88.214]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4SqdJy53qhz29fyh; Wed, 13 Dec 2023 09:32:50 +0800 (CST) Received: from kwepemm000013.china.huawei.com (unknown [7.193.23.81]) by mail.maildlp.com (Postfix) with ESMTPS id D61281A0192; Wed, 13 Dec 2023 09:33:57 +0800 (CST) Received: from huawei.com (10.175.104.67) by kwepemm000013.china.huawei.com (7.193.23.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 13 Dec 2023 09:33:57 +0800 From: Zhihao Cheng To: , CC: , Subject: [PATCH v2 0/5] jbd2: Add errseq to detect writeback Date: Wed, 13 Dec 2023 09:32:19 +0800 Message-ID: <20231213013224.2100050-1-chengzhihao1@huawei.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm000013.china.huawei.com (7.193.23.81) According to discussions in [1], this patchset adds errseq in journal to enable JDB2 detecting meatadata writeback error of fs dev. Then, orginal checking mechanism could be removed. [1] https://lore.kernel.org/all/20230908124317.2955345-1-chengzhihao1@huawei.com/T/ v1->v2: Fix some misspelling words. Patch 1: "fallen on" -> "written to" Patch 4: "can detects" -> "can detect" Zhihao Cheng (5): jbd2: Add errseq to detect client fs's bdev writeback error jbd2: Replace journal state flag by checking errseq jbd2: Remove unused 'JBD2_CHECKPOINT_IO_ERROR' and 'j_atomic_flags' jbd2: Abort journal when detecting metadata writeback error of fs dev ext4: Move ext4_check_bdev_write_error() into nojournal mode fs/ext4/ext4_jbd2.c | 5 ++--- fs/jbd2/checkpoint.c | 11 ----------- fs/jbd2/journal.c | 11 ++++++----- fs/jbd2/recovery.c | 7 +------ fs/jbd2/transaction.c | 14 ++++++++++++++ include/linux/jbd2.h | 37 ++++++++++++++++++++++++++----------- 6 files changed, 49 insertions(+), 36 deletions(-)