Skip to content

Commit e89fdcc

Browse files
OjaswinMtytso
authored andcommitted
ext4: enable dioread_nolock as default for bs < ps case
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]>
1 parent f2fec3e commit e89fdcc

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

fs/ext4/super.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2793,15 +2793,6 @@ static int ext4_check_opt_consistency(struct fs_context *fc,
27932793
return -EINVAL;
27942794
}
27952795

2796-
if (ctx_test_mount_opt(ctx, EXT4_MOUNT_DIOREAD_NOLOCK)) {
2797-
int blocksize =
2798-
BLOCK_SIZE << le32_to_cpu(sbi->s_es->s_log_block_size);
2799-
if (blocksize < PAGE_SIZE)
2800-
ext4_msg(NULL, KERN_WARNING, "Warning: mounting with an "
2801-
"experimental mount option 'dioread_nolock' "
2802-
"for blocksize < PAGE_SIZE");
2803-
}
2804-
28052796
err = ext4_check_test_dummy_encryption(fc, sb);
28062797
if (err)
28072798
return err;
@@ -4410,7 +4401,7 @@ static void ext4_set_def_opts(struct super_block *sb,
44104401
((def_mount_opts & EXT4_DEFM_NODELALLOC) == 0))
44114402
set_opt(sb, DELALLOC);
44124403

4413-
if (sb->s_blocksize == PAGE_SIZE)
4404+
if (sb->s_blocksize <= PAGE_SIZE)
44144405
set_opt(sb, DIOREAD_NOLOCK);
44154406
}
44164407

0 commit comments

Comments
 (0)