Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3942887pxb; Sat, 6 Nov 2021 03:45:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyM6twJT6inMdrTvFqdgMgZzONZuhpeSqQOLIobHhOdXEJD+Cd4Tv9X67RzQctD5ekNjW2T X-Received: by 2002:a05:6e02:12c2:: with SMTP id i2mr13989110ilm.261.1636195510583; Sat, 06 Nov 2021 03:45:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636195510; cv=none; d=google.com; s=arc-20160816; b=sO5iZozv2NQwUjbtu/pnWQt8DX7F7pXpYTkMYRjeYsHOfSe91U3yO/GL1xayXOayJ+ xCG0FCapsZrbgDgfA8qJMMmo7geYNxPOLCENBRsxd7xEinJ0ooHCF3DzF9gbJPC7Nl2q K2bODQGzWA0jgRZ81EDlaNsImlDLnnLpSE34QeKks1kbNpEka+dBCYoXBuvpJqLS/E9f aYXFS5PEbkvkp2DWWQzotQ/88m8CEhbaeWUXsOlCN9wHAZ61m/86rqoeiVdFo77nhY63 HgY4Im0lKS2V0PM2jh0dUhCtgZ7WhaCH2ahQNRxBGyw4lojcfjQaw4HrDifat9Yi5JyT IU0A== 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=DUeLl3GL340iUKIiVJiqtjBe7sAAcyIadJ3zWvIOyGU=; b=G3k9HGtBh1JGt6NNB42wEJlCqQ1dGoWJ3btx8vsmCsU3VZsNSlU88NP1a5qgAiyeZH to2Ym/cBSiSP9YyFMz4mbjogZuplL6r5K4eXw5vLAcj0ME8Q0L3wg93IbSSiiVaduc4S qtTkrTQODuAvO0PtMS0HmHNuv84yLM5AcOzLtuJIRdef77nrqEW63UcHJD376TzgNjsc QzgWAYGVoKZev/DzUrvCyHJbuhG8SCBqQqBb+/5MeZ7PBY0xe8BXZ1+6bfXIxiKqsPRD FQo6MOBaUqXme+MgiQSYPNzrtN9Gm7q4mshUJM90mSd16MCbunJ1jMi5b1vXQNK9cJN9 gX8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=XFk2OqW2; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p17si24545560iov.108.2021.11.06.03.44.57; Sat, 06 Nov 2021 03:45:10 -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=@infradead.org header.s=casper.20170209 header.b=XFk2OqW2; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233425AbhKFDsz (ORCPT + 99 others); Fri, 5 Nov 2021 23:48:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbhKFDsx (ORCPT ); Fri, 5 Nov 2021 23:48:53 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FD61C061570; Fri, 5 Nov 2021 20:46:13 -0700 (PDT) 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=DUeLl3GL340iUKIiVJiqtjBe7sAAcyIadJ3zWvIOyGU=; b=XFk2OqW2UNX/DKiU/a4IYDy1eY 5Td/YNDnwQYxICncieUyGPoGBBXHFnsxtSuqaYg+NZdoIXxYO9y71QebrlKZyejsKTe4lFv3vWrKV sIRezDA0ssnBH2ySdKC7tzKwB64OYooNkSn7StEqj6IyeeW2NQD47r7E4JeEWxsVZrfWDtxulOFPV p+foN/tCkHT9gPd/o5Z4ozfcmY7ac9i0xw9XDpWJr4Yul/DlYwVXQGT18EryzUKPe6CZ/BvETR4il Uu/SL2RAufcD1ulLw+EAUEh2TBidZFOl0YEm9VC65KXBiGvjYfNqhnqQG2etiFFCOHJvjb40ltVLP VYLXab5Q==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mjCdA-0071tn-Ae; Sat, 06 Nov 2021 03:45:03 +0000 Date: Sat, 6 Nov 2021 03:44:36 +0000 From: Matthew Wilcox To: "Darrick J. Wong" 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: 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: > +++ 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); Re-reviewing this patch, and I don't like the naming. How about: struct folio *src = page_folio(page); struct folio *dest = page_folio(newpage); ... eventually flowing that renaming throughout the migration implementations. > 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 >