From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91EF4C48BE5 for ; Tue, 15 Jun 2021 18:13:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0C19E610A0 for ; Tue, 15 Jun 2021 18:13:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0C19E610A0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9691B6B0072; Tue, 15 Jun 2021 14:13:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 92BEE6B0073; Tue, 15 Jun 2021 14:13:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7BA2E6B0074; Tue, 15 Jun 2021 14:13:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0145.hostedemail.com [216.40.44.145]) by kanga.kvack.org (Postfix) with ESMTP id 49E826B0072 for ; Tue, 15 Jun 2021 14:13:39 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id D3A8B82499A8 for ; Tue, 15 Jun 2021 18:13:38 +0000 (UTC) X-FDA: 78256756116.26.C5886F5 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf10.hostedemail.com (Postfix) with ESMTP id 2A3A24000283 for ; Tue, 15 Jun 2021 18:13:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=cmlOH2ygGuqkkEEXUVRYhK6toz49SclSyMHtpe4EPs4=; b=tEw+AvYOLjPVtnh1k27hxPEwjO ntiLTS24P4AI23cJzHtF5Lm1Z7QtbDL9ZYc4WubCvN/vmQP3zLKPEaAi3V9Ys3Rx6Y3bPq5c4M7H9 BYuiqTAwClrZbAK59VNSmyE+F6GOaqlD+2/yU78JwaXeJny0O5Kf/j6eLzSb1HgdTccz4EFLRplTE BgeUFow2hiITH+NH/Zvpg9UCmjXk0aETXPeSMRxUt8kFGeuw0I2ynwOgvil84rzIhiEC6Ero/5lG/ t+bMeTHe4wUMVw6IVHPqYLcSMgfKarNBjT0ABtWDzUsE5T4a96YOicfA00lJ7HMPzwz4BETVBXVgD PsJ1i6tg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltDYq-00770E-CH; Tue, 15 Jun 2021 18:13:21 +0000 Date: Tue, 15 Jun 2021 19:13:16 +0100 From: Matthew Wilcox To: Christoph Hellwig Cc: Greg Kroah-Hartman , Andrew Morton , Jan Kara , Al Viro , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/6] iomap: Use __set_page_dirty_nobuffers Message-ID: References: <20210615162342.1669332-1-willy@infradead.org> <20210615162342.1669332-4-willy@infradead.org> <20210615173453.GA2849@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210615173453.GA2849@lst.de> Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=tEw+AvYO; spf=none (imf10.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 2A3A24000283 X-Stat-Signature: z9tb756x6hebzfgfecynt7cek487km76 X-HE-Tag: 1623780809-972774 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Jun 15, 2021 at 07:34:53PM +0200, Christoph Hellwig wrote: > On Tue, Jun 15, 2021 at 06:32:37PM +0100, Matthew Wilcox wrote: > > On Tue, Jun 15, 2021 at 07:19:59PM +0200, Greg Kroah-Hartman wrote: > > > On Tue, Jun 15, 2021 at 05:23:39PM +0100, Matthew Wilcox (Oracle) wrote: > > > Using __ functions in structures in different modules feels odd to me. > > > Why not just have iomap_set_page_dirty be a #define to this function now > > > if you want to do this? > > > > > > Or take the __ off of the function name? > > > > > > Anyway, logic here is fine, but feels odd. > > > > heh, that was how I did it the first time. Then I thought that it was > > better to follow Christoph's patch: > > > > static const struct address_space_operations adfs_aops = { > > + .set_page_dirty = __set_page_dirty_buffers, > > (etc) > > Eventually everything around set_page_dirty should be changed to operate > on folios, and that will be a good time to come up with a sane > naming scheme without introducing extra churn. The way it currently looks in my tree ... set_page_dirty(page) is a thin wrapper that calls folio_mark_dirty(folio). folio_mark_dirty() calls a_ops->dirty_folio(mapping, folio) (which returns bool). __set_page_dirty_nobuffers() becomes filemap_dirty_folio() __set_page_dirty_buffers() becomes block_dirty_folio() __set_page_dirty_no_writeback() becomes dirty_folio_no_writeback() Now I look at it, maybe that last should be nowb_dirty_folio().