From patchwork Mon Nov 1 20:39:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 12597299 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0984C433FE for ; Mon, 1 Nov 2021 21:17:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A5B4660C49 for ; Mon, 1 Nov 2021 21:17:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230497AbhKAVTi (ORCPT ); Mon, 1 Nov 2021 17:19:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231312AbhKAVTY (ORCPT ); Mon, 1 Nov 2021 17:19:24 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 017D2C061764; Mon, 1 Nov 2021 14:16:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=Bx+F5BQFecP5/NIWNml8fMZvcj9H0D34Vhk0T/k/6XM=; b=RBGype5dL/KUTb42oGbk83TvcN v9X1Sn8Egxcei3h6+KPQRFLl7g9XJN367O57EQCQZSKsaCCww6zgPqyhwQZtj1vWCteybSrwgD25Q fsxpaLfy+zZYjbnrvD3u7DBrs6NglGeq6tllKQJRLCvYMjgoxN44sqC/Z3KnZxK+nyjspYboD7rJO UvZ2qJD7WACcIypeDdLbWl2dtdQGSkFZew3uLd4Z5Zt0w7bQNV/q405uxiJ8rEjMPw61eUtEWWBi5 z6r2W5AjE+jawnJBTk48yrb9g8f0doyey7BUk1X/qcmm7/jYExH+bZAR/BQPUbdMj1imX8ylH1SSK U9EwOSSg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mhecd-004247-WF; Mon, 01 Nov 2021 21:14:00 +0000 From: "Matthew Wilcox (Oracle)" To: "Darrick J. Wong" Cc: "Matthew Wilcox (Oracle)" , 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: [PATCH 21/21] xfs: Support multi-page folios Date: Mon, 1 Nov 2021 20:39:29 +0000 Message-Id: <20211101203929.954622-22-willy@infradead.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211101203929.954622-1-willy@infradead.org> References: <20211101203929.954622-1-willy@infradead.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Now that iomap has been converted, XFS is multi-page folio safe. Indicate to the VFS that it can now create multi-page folios for XFS. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong --- fs/xfs/xfs_icache.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c index f2210d927481..804507c82455 100644 --- a/fs/xfs/xfs_icache.c +++ b/fs/xfs/xfs_icache.c @@ -87,6 +87,7 @@ xfs_inode_alloc( /* VFS doesn't initialise i_mode or i_state! */ VFS_I(ip)->i_mode = 0; VFS_I(ip)->i_state = 0; + mapping_set_large_folios(VFS_I(ip)->i_mapping); XFS_STATS_INC(mp, vn_active); ASSERT(atomic_read(&ip->i_pincount) == 0); @@ -336,6 +337,7 @@ xfs_reinit_inode( inode->i_rdev = dev; inode->i_uid = uid; inode->i_gid = gid; + mapping_set_large_folios(inode->i_mapping); return error; }