Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6058668ybv; Tue, 18 Feb 2020 09:05:27 -0800 (PST) X-Google-Smtp-Source: APXvYqz50J4fJNMvQ9MoMeZssODoUn8KJGQwB5vu5HSqBjL/MNX2ycub2K7KtcEFwx03yqG5Jtmc X-Received: by 2002:aca:b504:: with SMTP id e4mr1945418oif.28.1582045526819; Tue, 18 Feb 2020 09:05:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582045526; cv=none; d=google.com; s=arc-20160816; b=IDWZGPOTrtb+rsoIL79yf5h6yhRCZQx+XmmakK/QxevyADTeciey3nBMPJVkpviCDo iVX5WiwC0k27xImqTWhmQHDrENd79Kk4ObqZjlfRY13OvDs6kUWtfOXSgFpjmV+UCYsa VRnTq+iQKei0nRuCr28RcMXxXEMNaBjX7iXG58FKKNwNV7rE8WRx0qscB8EAzV0Apxux cqOy2F7pDTTI2cbDhBChUZwl1rI5RcUOjpU4s6Y9LCbX1bjSEUUf7Vz70Jhx5K20HxAm palXwPgCscUh1k2RzNzE5o8hZobEW1t8raVODMHeI7ss+odiRpVosa1/XUfjYNjK08CC 8fIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=1MgL0Fb3bHg8KNR9Jg22RGeB4aozaC8dEd3z88d1toc=; b=zSG0H4SfzO9q5aKc/116Gt177+SnAzJwwjBYEhFuHd2+QA+XDGTNnvb5Lp0t/ofmFI DuyjLpa/oq3wfmO+OVHciFHhqpoxfDWoHzDXG+JG+J8ti70RN2pEpFDRE3nE+6DFTynq Q/Pn3ZVQgl2FZFAJk5UsELAUxjn5S3Gfp6vHXYhtZkQbPhEfhy7rbLHONkiHWDFoPr13 BTZVDIvMahcNCARMiAEe0HZu6hIxmIliiqGJNVymbVoE+/QTvXIDJrGTBYvKkQ40CVoY SKgi2F8cMQ0IRf2Xslum4C/7WCH92YqrlwST005CAborV1hfUDiEXp2/y/UT9dSoqZtc vw2Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h17si584958oib.234.2020.02.18.09.05.02; Tue, 18 Feb 2020 09:05:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726422AbgBRRE7 (ORCPT + 99 others); Tue, 18 Feb 2020 12:04:59 -0500 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:60274 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726399AbgBRRE7 (ORCPT ); Tue, 18 Feb 2020 12:04:59 -0500 Received: from callcc.thunk.org (guestnat-104-133-8-109.corp.google.com [104.133.8.109] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 01IH4h7a017263 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Feb 2020 12:04:45 -0500 Received: by callcc.thunk.org (Postfix, from userid 15806) id AC3654211EF; Tue, 18 Feb 2020 12:04:42 -0500 (EST) Date: Tue, 18 Feb 2020 12:04:42 -0500 From: "Theodore Y. Ts'o" To: "zhangyi (F)" Cc: Jan Kara , linux-ext4@vger.kernel.org, luoshijie1@huawei.com, zhangxiaoxu5@huawei.com Subject: Re: [PATCH v3 2/2] jbd2: do not clear the BH_Mapped flag when forgetting a metadata buffer Message-ID: <20200218170442.GC147128@mit.edu> References: <20200213063821.30455-1-yi.zhang@huawei.com> <20200213063821.30455-3-yi.zhang@huawei.com> <20200217093645.GC12032@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon, Feb 17, 2020 at 06:38:23PM +0800, zhangyi (F) wrote: > >> + /* > >> + * Block device buffers need to stay mapped all the > >> + * time, so it is enough to clear buffer_jbddirty and > >> + * buffer_freed bits. For the file mapping buffers (i.e. > >> + * journalled data) we need to unmap buffer and clear > >> + * more bits. We also need to be careful about the check > >> + * because the data page mapping can get cleared under > >> + * out hands, which alse need not to clear more bits > > ^^^ our ^^^^ Maybe I'd rephrase this like: > > > > ... under our hands. Note that if mapping == NULL, we don't need to make > > buffer unmapped because the page is already detached from the mapping and > > buffers cannot get reused. > > > Thanks for your suggestion, Ted has already pushed this patch to upstream, > I could write an appending patch to fix this. Feel free to send a patch to fix up the comment if you like. Thanks, - Ted