From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (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 40EC42206F; Thu, 21 Dec 2023 12:23:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 3EBAC68B05; Thu, 21 Dec 2023 13:23:14 +0100 (CET) Date: Thu, 21 Dec 2023 13:23:14 +0100 From: Christoph Hellwig To: Jan Kara Cc: Christoph Hellwig , linux-mm@kvack.org, "Matthew Wilcox (Oracle)" , Jan Kara , David Howells , Brian Foster , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 08/17] writeback: Factor should_writeback_folio() out of write_cache_pages() Message-ID: <20231221122314.GD17956@lst.de> References: <20231218153553.807799-1-hch@lst.de> <20231218153553.807799-9-hch@lst.de> <20231221112206.f6biqpkpwl6w64mo@quack3> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231221112206.f6biqpkpwl6w64mo@quack3> User-Agent: Mutt/1.5.17 (2007-11-01) On Thu, Dec 21, 2023 at 12:22:06PM +0100, Jan Kara wrote: > > +static bool should_writeback_folio(struct address_space *mapping, > > + struct writeback_control *wbc, struct folio *folio) > > +{ > > I'd call this function folio_prepare_writeback() or something like that to > make it clearer that this function is not only about the decision whether > we want to write folio or not but we also clear the dirty bit & > writeprotect the folio in page tables. Fine with me. I'll wait for willy to chime in if he has a strong preference.