Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp218966lqo; Tue, 7 May 2024 18:46:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX1GI9b6C1nEKZ7U7k3XOOaxdCf7yLQabMCJDDdjRDwD16E0c6fWJBj1jD54F1/53HR1CIu7Ygxk3HB07/Hkmyegcna8aTKvDWWdcXDfw== X-Google-Smtp-Source: AGHT+IF9kRRNcMmoktFrjzjmMQTZB3WpuOltrcL8LsEF8sjc0SsYmgVZLT+DqiPk5ylB7eUPmcxL X-Received: by 2002:a05:620a:394a:b0:792:94a5:1df6 with SMTP id af79cd13be357-792b27ebc49mr184727985a.51.1715132773697; Tue, 07 May 2024 18:46:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715132773; cv=pass; d=google.com; s=arc-20160816; b=srJC4my1xpZUG7/j20n8NouGUgImCsg3CrIjzIOLYfBmNCOm6KOcbVaEg5TsoXOMiz vmx1PNYaGJR0ZjdR0YR37/TKiFhL4sd1N5Z9Z2/KRm7XEs1/XNvrOqSUtU9eTEg75EGN TvHcQj0Z2oJvmyAI+QW2cm7re6AYDdD1Fzaw3qXaA2C/hnGe1erxxr8S2iwAyD6sAsG2 NKdb9jObTYpGluRCvJKrKokGhv5afmkt9Edhlx/cyMkY9Q7IMuzmUQLPzerHlEYwwngG Noa0rgz0hHZMnE5/A+co42VYMNattIXzoJBUvMZpdQzprF+HKN/RxzmWZ7xNOvVTBIsO AuhA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:user-agent:date:message-id:from :references:cc:to:subject; bh=e1K6XCLmEeh3ehPUEoYq50Nx+vxQAwOUxgemItnQYXk=; fh=/PuZcHigITtGdvpshrFw8DVVrZoJVP5WMm4/YCdEiB0=; b=GNg5i4Nd/bTLQSCbAH4CPUG8R0wcRlgrKaTh9lXg/odeOtsSd+3o6bzeLU5457MnZA 0YOkzD9i5Z4Fga1Vg0g/ArWijPe2aGPciuy0m74ZczNR3NvikeE0Q8Q3BeEk90NC5N8x xmqE9EZJSVYvD+wWJZo9UDomN6YZE0tXtL3gaLM1vTp7hIhJWwo30pnVenMP9PS2wiSn FnnMuWWebaWYP0YChx/JgWC44tCV+YoDLLNhbD7Z2/7P7cvD7HFF6ZlrIUIy6vhD+Skm 5myyXI7CzZYHklZsdzMNwRnfqox9VusgKkSXOJNfdUs/byBUMjIdCviyT91IzzxEh33U 6JGQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-ext4+bounces-2354-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2354-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d2-20020a05620a204200b00792962480d7si6118619qka.628.2024.05.07.18.46.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 18:46:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-2354-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-ext4+bounces-2354-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2354-linux.lists.archive=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 708CC1C2221A for ; Wed, 8 May 2024 01:46:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7D83A9441; Wed, 8 May 2024 01:46:06 +0000 (UTC) X-Original-To: linux-ext4@vger.kernel.org Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F40C8C13B; Wed, 8 May 2024 01:46:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715132766; cv=none; b=RpzwjnP9A+iaLRvdsrc+NRFarkan4Hvaq46L8g8KIOW60YJu8EfAe4B+FQoIRNzaMn69iw5i1cACCpNiE2/F9D+N5sjz2KjoTlVKBISjkaR3GJ9DRzQuaujC3R7Ty2DxbDhcBUY/Cazd9yFcW4GzIRPgYDFZOZ31p1jFc13PShI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715132766; c=relaxed/simple; bh=W7ybjPe0BkA14FFGDTX7fq0I5oQUbMY6QkKas4Geh64=; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=n3nGnN0BYDhnHqKTcxgxN/D7sz4JnMFJ8x1qvqU8rRfqDriwnZHVE/NBxi1m5RDY7Km5WfIBtB50egn/oBoyBgMeJkI/dhtjtnSZjQdjhufYrEuijGA0jflLePJCJllJkKwN/GaNE1lehus7CKZVl3hisnDwAbivfIVktnq29hw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.93.142]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4VYyf63Rlgz4f3mHq; Wed, 8 May 2024 09:45:50 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.252]) by mail.maildlp.com (Postfix) with ESMTP id 4B7DE1A0179; Wed, 8 May 2024 09:46:00 +0800 (CST) Received: from [10.174.178.129] (unknown [10.174.178.129]) by APP3 (Coremail) with SMTP id _Ch0CgAHCpJX2TpmvRKDLw--.36309S2; Wed, 08 May 2024 09:46:00 +0800 (CST) Subject: Re: [PATCH 4/9] jbd2: move repeat tag around to remove a repeat check of b_frozen_data To: Zhang Yi Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, tytso@mit.edu, jack@suse.com References: <20240506141801.1165315-1-shikemeng@huaweicloud.com> <20240506141801.1165315-5-shikemeng@huaweicloud.com> From: Kemeng Shi Message-ID: <76da9920-caa1-5f80-549f-ae07ada34fa9@huaweicloud.com> Date: Wed, 8 May 2024 09:45:59 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-CM-TRANSID:_Ch0CgAHCpJX2TpmvRKDLw--.36309S2 X-Coremail-Antispam: 1UD129KBjvJXoW7Kw13Zw47XFyfAw1DAr17Awb_yoW8Gryxpr 95KF1jkFWvq3srAFn7Wa1DZrWjvw4vgFy8KFs8Cr13Aay7Xr1IgFyjqw4UKw1jyrZ7G3y8 Zr1q93yxW3ZIvFDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUkG14x267AKxVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26w1j6s0DM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4U JVWxJr1l84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gc CE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E 2Ix0cI8IcVAFwI0_JrI_JrylYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJV W8JwACjcxG0xvEwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1lc7I2V7IY0VAS07AlzVAY IcxG8wCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14 v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkG c2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI 0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6Fyj6rWUJwCI42IY6I8E87Iv67AKxVWUJVW8 JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x0JUdEfOUUU UU= X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ on 5/7/2024 8:41 PM, Zhang Yi wrote: > On 2024/5/6 22:17, Kemeng Shi wrote: >> We make sure b_frozen_data is not NULL before jump to "repeat" tag, move >> "repeat" tag around to remove repeat check of b_frozen_data. >> >> Signed-off-by: Kemeng Shi >> --- >> fs/jbd2/journal.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c >> index 9a35d0c5b38c..77fcdc76fdfd 100644 >> --- a/fs/jbd2/journal.c >> +++ b/fs/jbd2/journal.c >> @@ -353,12 +353,12 @@ int jbd2_journal_write_metadata_buffer(transaction_t *transaction, >> atomic_set(&new_bh->b_count, 1); >> >> spin_lock(&jh_in->b_state_lock); >> -repeat: >> /* >> * If a new transaction has already done a buffer copy-out, then >> * we use that version of the data for the commit. >> */ >> if (jh_in->b_frozen_data) { >> +repeat: >> done_copy_out = 1; >> new_folio = virt_to_folio(jh_in->b_frozen_data); >> new_offset = offset_in_folio(new_folio, jh_in->b_frozen_data); >> > > I suppose we could drop the repeat tag entirely, just set the new_folio and > new_offset, and then goto handle do_escape. We don't need to call > jbd2_buffer_frozen_trigger() and check for escaping again, is that right? Sure, sounds reasonable to me. Will do it in next version. Thanks > > Thanks, > Yi. >