Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp510701lqh; Tue, 7 May 2024 06:17:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWmZkPHM8/T/QL1Z9r6ohWORRub8gPobQTzgxsjWzw7tHrSeL1yifdDpqPJNiY0DoM4DBKJkiEBMDQ2EbbXtfgs9azgkFV8a8OqBMsAMQ== X-Google-Smtp-Source: AGHT+IEZQgHCZgfRA0AB1bEkIfLeu4C9gfRtcvaTMdIeQCKI+LAfNQhR0/FGEbjMz0p0xV6I/+T5 X-Received: by 2002:a17:907:9482:b0:a59:c52b:9930 with SMTP id dm2-20020a170907948200b00a59c52b9930mr7767111ejc.61.1715087851052; Tue, 07 May 2024 06:17:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715087851; cv=pass; d=google.com; s=arc-20160816; b=v11uKLV+JFNvMzAy9+rcWGzRHQlRWKmfHYSiNKSdHqNmeoP3COrFnxR0TFtVXPsudM SKHg8QO4MnNyCihcwlBtfG8TUPvDw4fYI3IOn5VEbPV6p673k5XHtvgXPnVDykD4GzPS S/vAbogw4ztJGM8Bh3GeXjnkxgs5sMPHYt0pKLMyDrSfd2xlVRQYQeqSCn9iefvsNOXl PT3FQpJw4wEhnd+zQZUo1JxXkYI1Y9h1U+QLidtDRDWEadDLE6JFlziSQUQC0ED5JZiD Slz2thiW547uyPXrby3IX6ni0ZSy32NCvTdLSwA1A1SRsq9xxwO3brapiBk08Ou32ksS R6Hg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:user-agent:date :message-id:from:references:cc:to:subject; bh=mduir4iTc/1yjR8hkLHfoyuHpHTlxYex4dD/P6ER3RU=; fh=IHwpFdCa9h5mWiv416SeMULvVNmmO3J3/GUfiAeUsVg=; b=uRI4/hm0HDxhtYPeCpl0G9ksaFIODW7ljWStosGbEnbG4w2wGZkBL/L9WgKhJ4ESgc 54ciiNakbA2WIlbtd25AK2chSf83E37C6eeFZ3WcLI4eH4snFnrKcyv1XqG41QbOuVsQ v0QlPXX6EUW8lydgPjU9N3MPUjxIbxLe/3ldesJQQSX7g26HUQOnvFLLBXpBbVqnCSHr ND5iB/x2W9gRt3V5jvnPyv1cIX9rPwt08KLrEWAyL/XnjxU0Mgrf/x+QYJ+cva2oQgz3 3WQIR3snlvOHJUQbNrF53zmd/cdpz3DFshfO67Qck87dfSfj7VHiWT6BUzYygPiOpkiQ Q03w==; 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-2344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2344-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id o13-20020a170906288d00b00a59b6f00373si3417707ejd.489.2024.05.07.06.17.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 06:17:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-2344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-ext4+bounces-2344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2344-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 60A631F2709B for ; Tue, 7 May 2024 13:11:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D402B15E5BC; Tue, 7 May 2024 13:11:41 +0000 (UTC) X-Original-To: linux-ext4@vger.kernel.org Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) (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 1755415DBB9; Tue, 7 May 2024 13:11:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715087501; cv=none; b=LO03IWjwaWNyUTJbiVpGEauAnBEseOuJA1I2gJ4AJR+cN2H3DEG7+SqLwW2CoNvjYPOyIfho6sGxDLR249u+/knRD6fUZh9pkvjjXwx2SmATU7wkE3eYfWPMyPG255OG2SdGvRqSiaBP9cZ1Ad8gxk3kLryVSeiTIEprkmqNoRs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715087501; c=relaxed/simple; bh=l03cTZG83CQkVjnsc8Q28HnnucLh+YYVgCjPTYHUUQU=; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=VY9nOgSo7pudut+Wzl/IUwvo3jLm7AXcV9+ctYk9Gela+ZVb8alhSao3u/qQMcgEiIK4gDNPUyAmKuk+DMtnMDNDQkFn5No8sSdk4zUHvc51Ul1w/ZVtGM4FaKdpyCi4vszwqKWPMc43gZxjI4y+ZEaaqqamcTOEtzHJoeg2JnI= 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.56 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.163.216]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4VYdvg0lLTz4f3kFP; Tue, 7 May 2024 21:11:27 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.75]) by mail.maildlp.com (Postfix) with ESMTP id 5918F1A01D2; Tue, 7 May 2024 21:11:35 +0800 (CST) Received: from [10.174.179.80] (unknown [10.174.179.80]) by APP2 (Coremail) with SMTP id Syh0CgAnmAuFKDpmixUxMQ--.27812S3; Tue, 07 May 2024 21:11:35 +0800 (CST) Subject: Re: [PATCH 5/9] jbd2: remove unneeded kmap to do escape in jbd2_journal_write_metadata_buffer To: Kemeng Shi 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-6-shikemeng@huaweicloud.com> From: Zhang Yi Message-ID: <1fbac8b4-167f-6f03-35f2-cabe6fc0b5e3@huaweicloud.com> Date: Tue, 7 May 2024 21:11:33 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240506141801.1165315-6-shikemeng@huaweicloud.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CM-TRANSID:Syh0CgAnmAuFKDpmixUxMQ--.27812S3 X-Coremail-Antispam: 1UD129KBjvdXoW7Xr15AF43KFykuw1Duw17ZFb_yoWDAFX_Xa 1vy34kursxXrn7ZF4Fk3W5WrZ5Ww15Gr1kCF10q34Uuw10q3W8GrnIkrWktrnrWa1xKr45 Xa4q9F4rtF9IvjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb7xYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20E Y4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM28CjxkF64kEwV A0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2Ix0cI8IcVCY1x02 67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I 0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40E x7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x 0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41lc7I2V7IY0VAS07AlzVAYIcxG8wCF04k20xvY0x0E wIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E74 80Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0 I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04 k26cxKx2IYs7xG6rWUJVWrZr1UMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIE c7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x07UE-erUUUUU= X-CM-SenderInfo: d1lo6xhdqjqx5xdzvxpfor3voofrz/ On 2024/5/6 22:17, Kemeng Shi wrote: > The data to do escape could be accessed directly from b_frozen_data, > just remove unneeded kmap. > > Signed-off-by: Kemeng Shi Looks good to me. Reviewed-by: Zhang Yi > --- > fs/jbd2/journal.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c > index 77fcdc76fdfd..87f558bd2e8a 100644 > --- a/fs/jbd2/journal.c > +++ b/fs/jbd2/journal.c > @@ -423,11 +423,8 @@ int jbd2_journal_write_metadata_buffer(transaction_t *transaction, > * Did we need to do an escaping? Now we've done all the > * copying, we can finally do so. > */ > - if (do_escape) { > - mapped_data = kmap_local_folio(new_folio, new_offset); > - *((unsigned int *)mapped_data) = 0; > - kunmap_local(mapped_data); > - } > + if (do_escape) > + *((unsigned int *)jh_in->b_frozen_data) = 0; > > folio_set_bh(new_bh, new_folio, new_offset); > new_bh->b_size = bh_in->b_size; >