Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7163656rwd; Tue, 6 Jun 2023 07:11:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ66EaDA0PE3BJZpNEeGJ3aex/pvCJQ9FzoF82dP1nNVrRTZNErNqA9HYykJeZsnv1BmBIrE X-Received: by 2002:ac8:5f0c:0:b0:3f5:45c2:467f with SMTP id x12-20020ac85f0c000000b003f545c2467fmr2674493qta.5.1686060697630; Tue, 06 Jun 2023 07:11:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686060697; cv=none; d=google.com; s=arc-20160816; b=yYbU8wnZYSlvYdM65vmty8xf2JrJkmhJnhnDjVv/ASt/jJxq7pSLZlVYkgS7WSOH5i yA3m3tXeP32sQiNK46lhcydYbUL/PhRLoEbN5RkAIuCADlJs4kRv/rDoer3V/bEyMOmD JYCCec89lHpHfyzP7z2w6389eeXEW7g2QuK+UBWPgVQ0GNhgRHTfLh4M6eSDdvI/bx3L sF8GmtY5BKU+3fQjfNSmTHaoLAuQnCFJzhxhcUEkL6X+TO1yLncakH0LeSSLyUvCeGVL 5ItZk0Ttx6k4oGnSJtP/yVJnsfML2QiQgj2QEJG2pkbLJMk3DtDl9siI61Y4OuMh1doZ Uybg== 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=Q7mwxmWZu67+IaAqy5QBDeAsjACG2mmV+UDLU1kBNLs=; b=XOw7lqtAKpUXm1nIv/OAhwk3hQHmommfp3LmOE17eiQJtVBIGQZr6AWzMI3X5Myz8s sz5cofeuldcmL3pydWO9HNmzwlagUjVQbBVIBvCWJsesMrS8qcnpDROaQbRJxJVQsVRo lfmDeNGP9Ccz/pL2MSFwBz8kOHAimQeHwqQguFgkPDCZA9e3FIt/tw+0nj4cW2+OfhrT CzG8NwVaX9a3dk5VW56IDAKzCT0tc3ID07+lmvGOKrUIKhu9Euz9ZLik50b9gpXsdLPJ 4Me1ug0eVc2SttdpThs1mlQsuy8EDuaYeTuV4JZK4KoobEehOqctOAPjEZmNlY26eZE8 zOEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c12-20020a05622a024c00b003f5aa8ecadbsi6343850qtx.224.2023.06.06.07.11.22; Tue, 06 Jun 2023 07:11:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237485AbjFFN7q (ORCPT + 99 others); Tue, 6 Jun 2023 09:59:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237003AbjFFN7m (ORCPT ); Tue, 6 Jun 2023 09:59:42 -0400 Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2EF010C6 for ; Tue, 6 Jun 2023 06:59:39 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4QbBtG46lSz4f3mKx for ; Tue, 6 Jun 2023 21:59:34 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.104.170]) by APP2 (Coremail) with SMTP id Syh0CgAXB+XBO39kUFbyKw--.11143S4; Tue, 06 Jun 2023 21:59:34 +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, chengzhihao1@huawei.com Subject: [PATCH v3 0/6] jbd2: fix several checkpoint inconsistent issues Date: Tue, 6 Jun 2023 21:59:22 +0800 Message-Id: <20230606135928.434610-1-yi.zhang@huaweicloud.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: Syh0CgAXB+XBO39kUFbyKw--.11143S4 X-Coremail-Antispam: 1UD129KBjvJXoW7ZF1xWw4DuryDWr1kur1rZwb_yoW8Gw45pF Zag34fG395C3yxWr1I9a1UAr40yF48ur47JF98G3WkAF47uF4IqrZrGF10y34UKF93Kay3 tr1UWrWrGw4jy37anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUym14x267AKxVW8JVW5JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26F1j6w1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26F4j 6r4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0oV Cq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0 I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r 4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwCF04k20xvY0x0EwIxG rwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4 vE14v26r106r1rMI8E67AF67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0I7IY x2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k26c xKx2IYs7xG6r4j6FyUMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAF wI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0JUdHUDUUUUU= X-CM-SenderInfo: d1lo6xhdqjqx5xdzvxpfor3voofrz/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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-ext4@vger.kernel.org From: Zhang Yi v2->v3: - Init released parameter in journal_shrink_one_cp_list() instead of __jbd2_journal_clean_checkpoint_list() in patch 3. - Fix a comment in patch 5. v1->v2: - Drop the last patch in [1]. - Merge journal_clean_one_cp_list() into journal_shrink_one_cp_list(). - Fix the race issues through trying to hold buffer lock and check dirty state under the lock. - Append a cleanup patch, remove __journal_try_to_free_buffer(). Hello, The first two patches are from [1] and are not changed, appending another four (it depends on the first three) to fix another three race issues in the checkpoint procedure which could also lead to inconsistent results. [1] https://lore.kernel.org/linux-ext4/20230516020226.2813588-1-yi.zhang@huaweicloud.com/ Thanks, Yi. Zhang Yi (5): jbd2: recheck chechpointing non-dirty buffer jbd2: remove t_checkpoint_io_list jbd2: remove journal_clean_one_cp_list() jbd2: fix a race when checking checkpoint buffer busy jbd2: remove __journal_try_to_free_buffer() Zhihao Cheng (1): jbd2: Fix wrongly judgement for buffer head removing while doing checkpoint fs/jbd2/checkpoint.c | 277 ++++++++++++------------------------ fs/jbd2/commit.c | 3 +- fs/jbd2/transaction.c | 40 ++---- include/linux/jbd2.h | 7 +- include/trace/events/jbd2.h | 12 +- 5 files changed, 108 insertions(+), 231 deletions(-) -- 2.31.1