2024-01-16 01:33:51

by Sasha Levin

[permalink] [raw]
Subject: [PATCH AUTOSEL 6.1 08/14] ext4: enable dioread_nolock as default for bs < ps case

From: Ojaswin Mujoo <[email protected]>

[ Upstream commit e89fdcc425b6feea4dfb33877e9256757905d763 ]

dioread_nolock was originally disabled as a default option for bs < ps
scenarios due to a data corruption issue. Since then, we've had some
fixes in this area which address such issues. Enable dioread_nolock by
default and remove the experimental warning message for bs < ps path.

dioread for bs < ps has been tested on a 64k pagesize machine using:

kvm-xfstest -C 3 -g auto

with the following configs:

64k adv bigalloc_4k bigalloc_64k data_journal encrypt
dioread_nolock dioread_nolock_4k ext3 ext3conv nojournal

And no new regressions were seen compared to baseline kernel.

Suggested-by: Ritesh Harjani (IBM) <[email protected]>
Signed-off-by: Ojaswin Mujoo <[email protected]>
Reviewed-by: Ritesh Harjani (IBM) <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Theodore Ts'o <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
fs/ext4/super.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 601e097e1720..93ede89baeca 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2722,15 +2722,6 @@ static int ext4_check_opt_consistency(struct fs_context *fc,
return -EINVAL;
}

- if (ctx_test_mount_opt(ctx, EXT4_MOUNT_DIOREAD_NOLOCK)) {
- int blocksize =
- BLOCK_SIZE << le32_to_cpu(sbi->s_es->s_log_block_size);
- if (blocksize < PAGE_SIZE)
- ext4_msg(NULL, KERN_WARNING, "Warning: mounting with an "
- "experimental mount option 'dioread_nolock' "
- "for blocksize < PAGE_SIZE");
- }
-
err = ext4_check_test_dummy_encryption(fc, sb);
if (err)
return err;
@@ -4345,7 +4336,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)
+ if (sb->s_blocksize <= PAGE_SIZE)
set_opt(sb, DIOREAD_NOLOCK);
}

--
2.43.0



2024-01-24 05:56:59

by Ojaswin Mujoo

[permalink] [raw]
Subject: Re: [PATCH AUTOSEL 6.1 08/14] ext4: enable dioread_nolock as default for bs < ps case

On Tue, Jan 16, 2024 at 09:47:44PM +0100, Pavel Machek wrote:
> Hi!
> >
> > [ Upstream commit e89fdcc425b6feea4dfb33877e9256757905d763 ]
> >
> > dioread_nolock was originally disabled as a default option for bs < ps
> > scenarios due to a data corruption issue. Since then, we've had some
> > fixes in this area which address such issues. Enable dioread_nolock by
> > default and remove the experimental warning message for bs < ps path.
> >
> > dioread for bs < ps has been tested on a 64k pagesize machine using:
> >
> > kvm-xfstest -C 3 -g auto
> >
> > with the following configs:
> >
> > 64k adv bigalloc_4k bigalloc_64k data_journal encrypt
> > dioread_nolock dioread_nolock_4k ext3 ext3conv nojournal
> >
> > And no new regressions were seen compared to baseline kernel.
>
> But no fixes, either, so not suitable for stable.
>
> BR,
> Pavel

Hi Pavel, Sasha,

I agree, this can be dropped from stable since it is not a bug fix.

- ojaswin
>
> --
> DENX Software Engineering GmbH, Managing Director: Erika Unter
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany