Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp589936pxb; Wed, 3 Nov 2021 09:05:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVJaZFN/FhpPwavbQbHnF905OHPhGJI/z0JJVQkgcWVvUBrqakm52iGN6rb4AEudux/ycU X-Received: by 2002:a05:6602:26c8:: with SMTP id g8mr31960668ioo.74.1635955550123; Wed, 03 Nov 2021 09:05:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635955550; cv=none; d=google.com; s=arc-20160816; b=PTxrKUvNmIn+QnutcieC3XyXC39vKMAdJqoNCT9BTp5TLhOZKnbyXt5dkeNlOFhWg9 Bc+NQiOJT4Rp2qo32tehWa8P3796kpFTqCogBF7rLVaaNzFUG1Hv55VZOQSGIvnlv8lm w42ia92fiXwDO/dJxYmIFuXuXtCx5T7VbJu7OmbjIeatpqC9iibqIhQKd4cGyHBLVx9E 3f25K1uquH5DBJqV6lgm5/DkIoqyXmZeNcNr0FZAOLRbrf9SgeO1XbbNcQiX0zfkc6KA l1Mobctgsxk0xqSQI/2DJGJ5krUs7C55eUVRA2+gnqEqO4Btb/OFOa8HoTVn8r7tU5lt wSXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=IwUtWu4vwzzFds2ccmEkVvXo4A1jPfX0AGEfxLwdc4I=; b=o53wfpilLB5HEBgM3QiVT7Y32AuVfooRwlmBBFntU2X7WRdDVc2SqGW1MtoLvQy3am QJzCSfh9wN+gBjXV406wlJw+ZwLd4gGxnvJRB71Fetys5fYkex91jo7FSLSTdHUq12/I euqY4zcH/GVcn2dUtV1/syvW5jaiW20SvfOhbXzHQUzePLvytFh+7t6igDdC+UUYD8Sp wrQbjnp0k6qMdqKeuqIRUEXWRDlsge7y0r2Zg9pY/aeIs8y+6dDw/RTrIT9u/U5rkbZs 2W7UtaLQ5NGxX55bg2RlNcq1NtmxERz/WbYurqQZenAb3oJuZS8blMFLgmzTMaTED3Ow Gk8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=L4+wON+E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u15si3844354iot.89.2021.11.03.09.05.35; Wed, 03 Nov 2021 09:05:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=L4+wON+E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232641AbhKCQEy (ORCPT + 99 others); Wed, 3 Nov 2021 12:04:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:43214 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232621AbhKCQEw (ORCPT ); Wed, 3 Nov 2021 12:04:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 128EB60F39; Wed, 3 Nov 2021 16:02:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635955336; bh=u5i16BEePwX4WEXCbo2JNpQXuAFbW+rjoTHBDvqeohg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=L4+wON+EMB/OFHnYytPqWyw/GK5JtmmvlAHuFX3bcttqFurJTmQslmPfADYkBsOCV KfL/VMKcqRofy+VNs2aCGIVLg0KBQHxHH/vMtGAq1HE/ONx8bv0++a0TH4/DppmjSx GSiqT7RqoudEznlgQvGeiI7i+VvYyjfDTQ4qozpxVqLyZH3kDJi3Q2xJYAgDRyBjAJ dBC8S7BmgpKaC1uRlfZnv8XuvvXdnCsnoo86KbksLt2ndPrIWNyckGch4jRj3TAtoe nLgMKxYlSGqSpJN2tjz6w6B1NSw5z8cqFRhAvGJh8VrCiwbHFdix0k4f093tvdffEJ soX9UkuQh2ckQ== Date: Wed, 3 Nov 2021 09:02:15 -0700 From: "Darrick J. Wong" To: "Matthew Wilcox (Oracle)" Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Jens Axboe , Christoph Hellwig Subject: Re: [PATCH 19/21] iomap: Convert iomap_migrate_page to use folios Message-ID: <20211103160215.GL24307@magnolia> References: <20211101203929.954622-1-willy@infradead.org> <20211101203929.954622-20-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211101203929.954622-20-willy@infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 01, 2021 at 08:39:27PM +0000, Matthew Wilcox (Oracle) wrote: > The arguments are still pages for now, but we can use folios internally > and cut out a lot of calls to compound_head(). > > Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Darrick J. Wong --D > --- > fs/iomap/buffered-io.c | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c > index 2436933dfe42..3b93fdfedb72 100644 > --- a/fs/iomap/buffered-io.c > +++ b/fs/iomap/buffered-io.c > @@ -493,19 +493,21 @@ int > iomap_migrate_page(struct address_space *mapping, struct page *newpage, > struct page *page, enum migrate_mode mode) > { > + struct folio *folio = page_folio(page); > + struct folio *newfolio = page_folio(newpage); > int ret; > > - ret = migrate_page_move_mapping(mapping, newpage, page, 0); > + ret = folio_migrate_mapping(mapping, newfolio, folio, 0); > if (ret != MIGRATEPAGE_SUCCESS) > return ret; > > - if (page_has_private(page)) > - attach_page_private(newpage, detach_page_private(page)); > + if (folio_test_private(folio)) > + folio_attach_private(newfolio, folio_detach_private(folio)); > > if (mode != MIGRATE_SYNC_NO_COPY) > - migrate_page_copy(newpage, page); > + folio_migrate_copy(newfolio, folio); > else > - migrate_page_states(newpage, page); > + folio_migrate_flags(newfolio, folio); > return MIGRATEPAGE_SUCCESS; > } > EXPORT_SYMBOL_GPL(iomap_migrate_page); > -- > 2.33.0 >