linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 6.4-rc2 xfstests-bld nojournal regression - generic/231
@ 2023-05-16 17:54 Eric Whitney
  2023-05-27  3:57 ` [PATCH] ext4: enable the lazy init thread when remounting read/write Theodore Ts'o
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Whitney @ 2023-05-16 17:54 UTC (permalink / raw)
  To: tytso; +Cc: linux-ext4

Hi Ted:

I'm seeing an apparent test regression on 6.4-rc2 while running the nojournal
test case with kvm-xfstests.  This is generic/231, which fails with 40%
reliability (or better) for me in 10 trial runs.  I'm not seeing failures in
the other test cases, including 0 failures in a 10 trial run on 4k.

The relevant output from 231.full is:

ltp/fsx -q -l 64000000 -o 65536 -N 20000 -S 12221 /vdc/fsx_file1
All 20000 operations completed A-OK!
ltp/fsx -q -l 64000000 -o 65536 -N 20000 -S 30719 /vdc/fsx_file1
ltp/fsx -q -l 64000000 -o 65536 -N 20000 -S 7219 /vdc/fsx_file2
ltp/fsx -q -l 64000000 -o 65536 -N 20000 -S 29252 /vdc/fsx_file3
ltp/fsx -q -l 64000000 -o 65536 -N 20000 -S 7909 /vdc/fsx_file4
All 20000 operations completed A-OK!
All 20000 operations completed A-OK!
All 20000 operations completed A-OK!
All 20000 operations completed A-OK!
ltp/fsx -f -q -l 64000000 -o 65536 -N 20000 -S 6375 /vdc/fsx_file1
All 20000 operations completed A-OK!
_check_generic_filesystem: filesystem on /dev/vdc is inconsistent
*** fsck.ext4 output ***
fsck from util-linux 2.36.1
e2fsck 1.47.0 (5-Feb-2023)
Pass 1: Checking inodes, blocks, and sizes
Inode 17 passes checks, but checksum does not match inode.  Fix? no

Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/vdc: ********** WARNING: Filesystem still has errors **********

This test failure bisects to:  a44be64bbecb ("ext4: don't clear SB_RDONLY when
remounting r/w until quota is re-enabled").  Reverting this patch eliminates
the test failure (passes 100/100 trials).

Eric

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] ext4: enable the lazy init thread when remounting read/write
  2023-05-16 17:54 6.4-rc2 xfstests-bld nojournal regression - generic/231 Eric Whitney
@ 2023-05-27  3:57 ` Theodore Ts'o
  2023-05-28 17:47   ` Eric Whitney
  2023-05-30 19:26   ` Theodore Ts'o
  0 siblings, 2 replies; 4+ messages in thread
From: Theodore Ts'o @ 2023-05-27  3:57 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: Theodore Ts'o

In commit a44be64bbecb ("ext4: don't clear SB_RDONLY when remounting
r/w until quota is re-enabled") we defer clearing tyhe SB_RDONLY flag
in struct super.  However, we didn't defer when we checked sb_rdonly()
to determine the lazy itable init thread should be enabled, with the
next result that the lazy inode table initialization would not be
properly started.  This can cause generic/231 to fail in ext4's
nojournal mode.

Fix this by moving when we decide to start or stop the lazy itable
init thread to after we clear the SB_RDONLY flag when we are
remounting the file system read/write.

Fixes a44be64bbecb ("ext4: don't clear SB_RDONLY when remounting r/w until...")
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 fs/ext4/super.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 9680fe753e59..56a5d1c469fc 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -6588,18 +6588,6 @@ static int __ext4_remount(struct fs_context *fc, struct super_block *sb)
 		}
 	}
 
-	/*
-	 * Reinitialize lazy itable initialization thread based on
-	 * current settings
-	 */
-	if (sb_rdonly(sb) || !test_opt(sb, INIT_INODE_TABLE))
-		ext4_unregister_li_request(sb);
-	else {
-		ext4_group_t first_not_zeroed;
-		first_not_zeroed = ext4_has_uninit_itable(sb);
-		ext4_register_li_request(sb, first_not_zeroed);
-	}
-
 	/*
 	 * Handle creation of system zone data early because it can fail.
 	 * Releasing of existing data is done when we are sure remount will
@@ -6637,6 +6625,18 @@ static int __ext4_remount(struct fs_context *fc, struct super_block *sb)
 	if (enable_rw)
 		sb->s_flags &= ~SB_RDONLY;
 
+	/*
+	 * Reinitialize lazy itable initialization thread based on
+	 * current settings
+	 */
+	if (sb_rdonly(sb) || !test_opt(sb, INIT_INODE_TABLE))
+		ext4_unregister_li_request(sb);
+	else {
+		ext4_group_t first_not_zeroed;
+		first_not_zeroed = ext4_has_uninit_itable(sb);
+		ext4_register_li_request(sb, first_not_zeroed);
+	}
+
 	if (!ext4_has_feature_mmp(sb) || sb_rdonly(sb))
 		ext4_stop_mmpd(sbi);
 
-- 
2.31.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ext4: enable the lazy init thread when remounting read/write
  2023-05-27  3:57 ` [PATCH] ext4: enable the lazy init thread when remounting read/write Theodore Ts'o
@ 2023-05-28 17:47   ` Eric Whitney
  2023-05-30 19:26   ` Theodore Ts'o
  1 sibling, 0 replies; 4+ messages in thread
From: Eric Whitney @ 2023-05-28 17:47 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: Ext4 Developers List

* Theodore Ts'o <tytso@mit.edu>:
> In commit a44be64bbecb ("ext4: don't clear SB_RDONLY when remounting
> r/w until quota is re-enabled") we defer clearing tyhe SB_RDONLY flag
> in struct super.  However, we didn't defer when we checked sb_rdonly()
> to determine the lazy itable init thread should be enabled, with the
> next result that the lazy inode table initialization would not be
> properly started.  This can cause generic/231 to fail in ext4's
> nojournal mode.
> 
> Fix this by moving when we decide to start or stop the lazy itable
> init thread to after we clear the SB_RDONLY flag when we are
> remounting the file system read/write.
> 
> Fixes a44be64bbecb ("ext4: don't clear SB_RDONLY when remounting r/w until...")
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> ---
>  fs/ext4/super.c | 24 ++++++++++++------------
>  1 file changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 9680fe753e59..56a5d1c469fc 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -6588,18 +6588,6 @@ static int __ext4_remount(struct fs_context *fc, struct super_block *sb)
>  		}
>  	}
>  
> -	/*
> -	 * Reinitialize lazy itable initialization thread based on
> -	 * current settings
> -	 */
> -	if (sb_rdonly(sb) || !test_opt(sb, INIT_INODE_TABLE))
> -		ext4_unregister_li_request(sb);
> -	else {
> -		ext4_group_t first_not_zeroed;
> -		first_not_zeroed = ext4_has_uninit_itable(sb);
> -		ext4_register_li_request(sb, first_not_zeroed);
> -	}
> -
>  	/*
>  	 * Handle creation of system zone data early because it can fail.
>  	 * Releasing of existing data is done when we are sure remount will
> @@ -6637,6 +6625,18 @@ static int __ext4_remount(struct fs_context *fc, struct super_block *sb)
>  	if (enable_rw)
>  		sb->s_flags &= ~SB_RDONLY;
>  
> +	/*
> +	 * Reinitialize lazy itable initialization thread based on
> +	 * current settings
> +	 */
> +	if (sb_rdonly(sb) || !test_opt(sb, INIT_INODE_TABLE))
> +		ext4_unregister_li_request(sb);
> +	else {
> +		ext4_group_t first_not_zeroed;
> +		first_not_zeroed = ext4_has_uninit_itable(sb);
> +		ext4_register_li_request(sb, first_not_zeroed);
> +	}
> +
>  	if (!ext4_has_feature_mmp(sb) || sb_rdonly(sb))
>  		ext4_stop_mmpd(sbi);
>  
> -- 
> 2.31.0
>

Hi Ted:

100/100 trials of generic/231 with nojournal passed when I used kvm-xfstests
to run it on a 6.4-rc3 kernel modified with this patch.  A complete run of the
nojournal test case also passed for me without new regressions.

So,
Tested-by: Eric Whitney <enwlinux@gmail.com>

Thanks,
Eric


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ext4: enable the lazy init thread when remounting read/write
  2023-05-27  3:57 ` [PATCH] ext4: enable the lazy init thread when remounting read/write Theodore Ts'o
  2023-05-28 17:47   ` Eric Whitney
@ 2023-05-30 19:26   ` Theodore Ts'o
  1 sibling, 0 replies; 4+ messages in thread
From: Theodore Ts'o @ 2023-05-30 19:26 UTC (permalink / raw)
  To: Ext4 Developers List, Theodore Ts'o


On Fri, 26 May 2023 23:57:29 -0400, Theodore Ts'o wrote:
> In commit a44be64bbecb ("ext4: don't clear SB_RDONLY when remounting
> r/w until quota is re-enabled") we defer clearing tyhe SB_RDONLY flag
> in struct super.  However, we didn't defer when we checked sb_rdonly()
> to determine the lazy itable init thread should be enabled, with the
> next result that the lazy inode table initialization would not be
> properly started.  This can cause generic/231 to fail in ext4's
> nojournal mode.
> 
> [...]

Applied, thanks!

[1/1] ext4: enable the lazy init thread when remounting read/write
      commit: 781c858c35c821f7055ccca73d27b6d1c77798b3

Best regards,
-- 
Theodore Ts'o <tytso@mit.edu>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-05-30 19:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-16 17:54 6.4-rc2 xfstests-bld nojournal regression - generic/231 Eric Whitney
2023-05-27  3:57 ` [PATCH] ext4: enable the lazy init thread when remounting read/write Theodore Ts'o
2023-05-28 17:47   ` Eric Whitney
2023-05-30 19:26   ` Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).