[PATCH v2 2/2] erofs: enable large folios for fscache mode

Jingbo Xu posted 2 patches 2 years, 9 months ago
There is a newer version of this series
[PATCH v2 2/2] erofs: enable large folios for fscache mode
Posted by Jingbo Xu 2 years, 9 months ago
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 <jefflexu@linux.alibaba.com>
---
 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
Re: [Phishing Risk] [External] [PATCH v2 2/2] erofs: enable large folios for fscache mode
Posted by Jia Zhu 2 years, 9 months ago

在 2022/11/28 10:50, Jingbo Xu 写道:
> 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 <jefflexu@linux.alibaba.com>

Reviewed-by: Jia Zhu <zhujia.zj@bytedance.com>

Thanks.
> ---
>   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;