Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp11557361rwb; Fri, 25 Nov 2022 17:47:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf50UaIqa6cC02WWPVumWUPxg8FpilXJfX3+heq7y+oK9gjv3gD6Q8StQXhA5W/BQwppjNOU X-Received: by 2002:a17:906:660e:b0:78d:b43c:81be with SMTP id b14-20020a170906660e00b0078db43c81bemr25064205ejp.600.1669427227139; Fri, 25 Nov 2022 17:47:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669427227; cv=none; d=google.com; s=arc-20160816; b=pPnB6QW1GoKoe3iyJ0+QdRzUoqHOEB/5EmGNyf+jy+Ig/+Z9wnssi4mz5Nkck2T9hn 1aiLlsia278QJiOD/YVLoQTOxNLsWAudNlq9yRWdymBCYAJhc3bSdc5JfaG/uL1u5Y63 rAAR0EiDiragqPEYK3E4xLmX/frdY8ByZeiylPfK4u9qmcZNRQsIWRADbbmRed5+nY4X lsIHMMVtI7UXE/AH8CCHi7mfipOesGe7p3iRWWY4Ok46l5ptIhfhgyCcnca2+xjBhZyS Ptu4TKUK+MaT+VwShvsn9c5UaoN0uIM//DcroA/7Jciyf8S6S2ZXKBCr0ohpoZ0k05q5 9uOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=TmowinmPna8r5xcroXh7sq+LOfZLpes/ZUZ8thEIJ58=; b=xPM9WGMLLDJ7h6e7UT0eN9rxog6FDN42widWKWl9lwDRhyxgt+NivM2jMG3tk2HL7m O31FtLKGTClnNMGR9giDWpLqTmoSE+rzSUFvA/BPuZuW5rZdyyUglSsWHNePVntFwqKN eJiKnIylqpw4ziUlYLmAWBY7bw64RBAvnv0MP+NO7Jz+Qs73j/5AtoI9GH6ZgXnNDSnR ZGveVpdxq9MvpQOmUwF0VzE3cSVzNrvTj6BCEhyQ8Ew3erkPDXVKYyPh+nkvg0JgCLAa U8Rz//GDR0BJgwD6a+XhcpHnLQK9QSCYeMd8XOPvE+Fd1Kx2QZgHph6Wtcmqr21CR54L of2w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dm14-20020a170907948e00b0078e06df0d29si5339781ejc.705.2022.11.25.17.46.46; Fri, 25 Nov 2022 17:47:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230134AbiKZA6H (ORCPT + 85 others); Fri, 25 Nov 2022 19:58:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230080AbiKZA6E (ORCPT ); Fri, 25 Nov 2022 19:58:04 -0500 Received: from out199-13.us.a.mail.aliyun.com (out199-13.us.a.mail.aliyun.com [47.90.199.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6573A5C0E2 for ; Fri, 25 Nov 2022 16:58:03 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R321e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046051;MF=jefflexu@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0VVgrtrD_1669424278; Received: from localhost(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0VVgrtrD_1669424278) by smtp.aliyun-inc.com; Sat, 26 Nov 2022 08:57:59 +0800 From: Jingbo Xu To: xiang@kernel.org, chao@kernel.org, linux-erofs@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 2/2] erofs: enable large folio support for non-compressed format Date: Sat, 26 Nov 2022 08:57:56 +0800 Message-Id: <20221126005756.7662-3-jefflexu@linux.alibaba.com> X-Mailer: git-send-email 2.19.1.6.gb485710b In-Reply-To: <20221126005756.7662-1-jefflexu@linux.alibaba.com> References: <20221126005756.7662-1-jefflexu@linux.alibaba.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Enable large folio in both device and fscache mode. Then the readahead routine will pass down large folio containing multiple pages. Enable this feature for non-compressed format for now, until the compression part supports large folio later. Signed-off-by: Jingbo Xu --- fs/erofs/fscache.c | 1 + fs/erofs/inode.c | 1 + 2 files changed, 2 insertions(+) diff --git a/fs/erofs/fscache.c b/fs/erofs/fscache.c index 0643b205c7eb..d2dd58ce312b 100644 --- a/fs/erofs/fscache.c +++ b/fs/erofs/fscache.c @@ -436,6 +436,7 @@ struct erofs_fscache *erofs_fscache_acquire_cookie(struct super_block *sb, inode->i_size = OFFSET_MAX; inode->i_mapping->a_ops = &erofs_fscache_meta_aops; mapping_set_gfp_mask(inode->i_mapping, GFP_NOFS); + mapping_set_large_folios(inode->i_mapping); ctx->inode = inode; } diff --git a/fs/erofs/inode.c b/fs/erofs/inode.c index ad2a82f2eb4c..85932086d23f 100644 --- a/fs/erofs/inode.c +++ b/fs/erofs/inode.c @@ -295,6 +295,7 @@ static int erofs_fill_inode(struct inode *inode) goto out_unlock; } inode->i_mapping->a_ops = &erofs_raw_access_aops; + mapping_set_large_folios(inode->i_mapping); #ifdef CONFIG_EROFS_FS_ONDEMAND if (erofs_is_fscache_mode(inode->i_sb)) inode->i_mapping->a_ops = &erofs_fscache_access_aops; -- 2.19.1.6.gb485710b