Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp743372rwb; Tue, 29 Nov 2022 04:59:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf4eyDCQ0MPq/nZOiMufuMiEn00VSFZPs2aowi0eshyBoiKoWu0x68VyVdwbBJaTnCUJZdD1 X-Received: by 2002:a17:90a:c68d:b0:219:80b:6ea with SMTP id n13-20020a17090ac68d00b00219080b06eamr24125604pjt.212.1669726795872; Tue, 29 Nov 2022 04:59:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669726795; cv=none; d=google.com; s=arc-20160816; b=MXqWeOEcM3Pwmo2tpnC/0jLpPMNjyT4h3pHMh6nsEJLEM59A21SBQKlj5kh3yyegAb bK6A60I9u4d/x6rUfUbslc9YvLlZkP7nvJBTfeXZXX8L4zGzMigJWLWw1k46sGE+p+PM Uw0IsNQLbdp92zZimgkhtWEh6FTn8nbaV0b8kp7NDD1tSSlF9McT+DoyTBxZCPOWPvP4 0KBq3eBMKamT9Z3bTEPwzfAXP6zeYLPLnTnz+T0Zr7TnDOsMsm9GqFhPNqLv+K77ZksR wMzJYhonkKmPzC7IGomYh+5gT35YNBYRowuIwC5IHxSX4nVmh33lZRI8QOpGK76pQNxH XYIQ== 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=3qZJstr3MoZUCnFCh+pJReBToK7hjXHr9khH/zVuS0M=; b=oIzewQNKmKqfomlWXj0cjRJn+M0BGY1CNcwvzhcIFaX/ef00lo2Rlb1V9Le5PUwFgu cA+J+m1kZ0VNOys08qr1injBcR5t7mi6/5nHRMdIAiJuArUL4iaK8IEgtzK2j+4vru7Y NTl/fOPJNqwURa8gWc/Nx3eOIwlMi8eiVPaf5cjXDZdhEyd9EAyXEFMYSNll2p9o2ZNZ igoXMkyyd7rG7ohWzEV99haBAKtS3iRvYqjHqfV6BsyZRNsiGvyeumBuDVuyhiAZzknE sqauU2cTdl4by3Uyfv8KvT4wSvYLIujppUOqUeLwMuzCIGC9WyL8GPX1+EBOLBDV0t2y MAag== 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 i1-20020a170902c94100b00189808dfd62si8517917pla.34.2022.11.29.04.59.44; Tue, 29 Nov 2022 04:59:55 -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 S233375AbiK2L7K (ORCPT + 83 others); Tue, 29 Nov 2022 06:59:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232772AbiK2L6l (ORCPT ); Tue, 29 Nov 2022 06:58:41 -0500 Received: from out30-43.freemail.mail.aliyun.com (out30-43.freemail.mail.aliyun.com [115.124.30.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94A22C757 for ; Tue, 29 Nov 2022 03:58:39 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046050;MF=jefflexu@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0VW-cX8S_1669723115; Received: from localhost(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0VW-cX8S_1669723115) by smtp.aliyun-inc.com; Tue, 29 Nov 2022 19:58:36 +0800 From: Jingbo Xu To: xiang@kernel.org, chao@kernel.org, linux-erofs@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH v3 2/2] erofs: enable large folios for fscache mode Date: Tue, 29 Nov 2022 19:58:33 +0800 Message-Id: <20221129115833.41062-3-jefflexu@linux.alibaba.com> X-Mailer: git-send-email 2.19.1.6.gb485710b In-Reply-To: <20221129115833.41062-1-jefflexu@linux.alibaba.com> References: <20221129115833.41062-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,RCVD_IN_MSPIKE_H2, 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 folios for fscache mode. Enable this feature for non-compressed format for now, until the compression part supports large folios later. One thing worth noting is that, the feature is not enabled for the meta data routine since meta inodes don't need large folios for now, nor do they support readahead yet. Signed-off-by: Jingbo Xu Reviewed-by: Jia Zhu Link: https://lore.kernel.org/r/20221128025011.36352-3-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang --- fs/erofs/inode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/erofs/inode.c b/fs/erofs/inode.c index e457b8a59ee7..85932086d23f 100644 --- a/fs/erofs/inode.c +++ b/fs/erofs/inode.c @@ -295,8 +295,7 @@ static int erofs_fill_inode(struct inode *inode) goto out_unlock; } inode->i_mapping->a_ops = &erofs_raw_access_aops; - if (!erofs_is_fscache_mode(inode->i_sb)) - mapping_set_large_folios(inode->i_mapping); + 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