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=-17.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 CFF25C07E9B for ; Tue, 20 Jul 2021 23:56:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 847016101B for ; Tue, 20 Jul 2021 23:56:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 847016101B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 202926B0011; Tue, 20 Jul 2021 19:56:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1B1F96B0036; Tue, 20 Jul 2021 19:56:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 07AA96B006C; Tue, 20 Jul 2021 19:56:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0238.hostedemail.com [216.40.44.238]) by kanga.kvack.org (Postfix) with ESMTP id DBC8D6B0011 for ; Tue, 20 Jul 2021 19:56:39 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 6C1671851C0D8 for ; Tue, 20 Jul 2021 23:56:38 +0000 (UTC) X-FDA: 78384628476.09.1E647A9 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf17.hostedemail.com (Postfix) with ESMTP id 2841AF002CB3 for ; Tue, 20 Jul 2021 23:56:38 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 30C5F60E0B; Tue, 20 Jul 2021 23:56:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626825397; bh=U92xkqIE4CqVD0WnacDiiqqfgQ5IF7soPJdMTmHHWyg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gau+Iq9v5cwTf6g+Acr0QEw2rRO3wFs4avw8kumdIop0WSoNRnCcTYwA6eXU6uZ6x 2LZ629n7hxJraRk06k7UUh02u1/u1i8uZ7+bz/XWU5eSYQuYMBjHweKNiwBJXr5zFz 5eGANnry+27sndh7+srlD//e5jjWbw6syZjyuU3QOgTd089Ssf2AAHBfaBYVNzQ+il cv6BlWOFEjKxSYvXFBeLV9J7uDvj7bCtC3uiJUR5h8MNBR4HeImux7samm2zCLu5sY MLbrvtF7PiwJ9BzUBHu5ixiAyPzTD9SUb7U8SUJPgpoqFW+84zaNJVtONX51ezcq+S MX2ty9fqV+BnA== Date: Tue, 20 Jul 2021 16:56:36 -0700 From: "Darrick J. Wong" To: "Matthew Wilcox (Oracle)" Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-block@vger.kernel.org Subject: Re: [PATCH v15 06/17] iomap: Convert iomap_releasepage to use a folio Message-ID: <20210720235636.GA3033223@magnolia> References: <20210719184001.1750630-1-willy@infradead.org> <20210719184001.1750630-7-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210719184001.1750630-7-willy@infradead.org> Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=gau+Iq9v; spf=pass (imf17.hostedemail.com: domain of djwong@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=djwong@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 2841AF002CB3 X-Stat-Signature: abx4zcz7uh15w8qp79qmrwga8inhcwrw X-HE-Tag: 1626825398-467738 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 Mon, Jul 19, 2021 at 07:39:50PM +0100, Matthew Wilcox (Oracle) wrote: > This is an address_space operation, so its argument must remain as a > struct page, but we can use a folio internally. > > Signed-off-by: Matthew Wilcox (Oracle) /me curses at vger and fsdevel for not delivering this; if I have to scrape lore to have reliable email, why don't we just use a webpage for this? The patch itself looks good though. Reviewed-by: Darrick J. Wong --D > --- > fs/iomap/buffered-io.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c > index 83eb5fdcbe05..715b25a1c1e6 100644 > --- a/fs/iomap/buffered-io.c > +++ b/fs/iomap/buffered-io.c > @@ -460,15 +460,15 @@ iomap_releasepage(struct page *page, gfp_t gfp_mask) > { > struct folio *folio = page_folio(page); > > - trace_iomap_releasepage(page->mapping->host, page_offset(page), > - PAGE_SIZE); > + trace_iomap_releasepage(folio->mapping->host, folio_pos(folio), > + folio_size(folio)); > > /* > * mm accommodates an old ext3 case where clean pages might not have had > * the dirty bit cleared. Thus, it can send actual dirty pages to > * ->releasepage() via shrink_active_list(), skip those here. > */ > - if (PageDirty(page) || PageWriteback(page)) > + if (folio_test_dirty(folio) || folio_test_writeback(folio)) > return 0; > iomap_page_release(folio); > return 1; > -- > 2.30.2 >