[PATCH 05/25] ext4: enable DIOREAD_NOLOCK by default for BS > PS as well

libaokun@huaweicloud.com posted 25 patches 3 months, 2 weeks ago
There is a newer version of this series
[PATCH 05/25] ext4: enable DIOREAD_NOLOCK by default for BS > PS as well
Posted by libaokun@huaweicloud.com 3 months, 2 weeks ago
From: Baokun Li <libaokun1@huawei.com>

The dioread_nolock related processes already support large folio, so
dioread_nolock is enabled by default regardless of whether the blocksize
is less than, equal to, or greater than PAGE_SIZE.

Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
---
 fs/ext4/super.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 894529f9b0cc..aa5aee4d1b63 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -4383,8 +4383,7 @@ static void ext4_set_def_opts(struct super_block *sb,
 	    ((def_mount_opts & EXT4_DEFM_NODELALLOC) == 0))
 		set_opt(sb, DELALLOC);
 
-	if (sb->s_blocksize <= PAGE_SIZE)
-		set_opt(sb, DIOREAD_NOLOCK);
+	set_opt(sb, DIOREAD_NOLOCK);
 }
 
 static int ext4_handle_clustersize(struct super_block *sb)
-- 
2.46.1
Re: [PATCH 05/25] ext4: enable DIOREAD_NOLOCK by default for BS > PS as well
Posted by Jan Kara 3 months, 1 week ago
On Sat 25-10-25 11:22:01, libaokun@huaweicloud.com wrote:
> From: Baokun Li <libaokun1@huawei.com>
> 
> The dioread_nolock related processes already support large folio, so
> dioread_nolock is enabled by default regardless of whether the blocksize
> is less than, equal to, or greater than PAGE_SIZE.
> 
> Signed-off-by: Baokun Li <libaokun1@huawei.com>
> Reviewed-by: Zhang Yi <yi.zhang@huawei.com>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  fs/ext4/super.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 894529f9b0cc..aa5aee4d1b63 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -4383,8 +4383,7 @@ static void ext4_set_def_opts(struct super_block *sb,
>  	    ((def_mount_opts & EXT4_DEFM_NODELALLOC) == 0))
>  		set_opt(sb, DELALLOC);
>  
> -	if (sb->s_blocksize <= PAGE_SIZE)
> -		set_opt(sb, DIOREAD_NOLOCK);
> +	set_opt(sb, DIOREAD_NOLOCK);
>  }
>  
>  static int ext4_handle_clustersize(struct super_block *sb)
> -- 
> 2.46.1
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR