ltp.lists.linux.it archive mirror
 help / color / mirror / Atom feed
* [LTP] [PATCH] mkfs: relax size check
@ 2022-11-29  3:17 zenghongling
  2022-11-29 10:24 ` Petr Vorel
  0 siblings, 1 reply; 9+ messages in thread
From: zenghongling @ 2022-11-29  3:17 UTC (permalink / raw)
  To: ltp, zenghongling

Number of total data blocks in filesystem reported by statfs
may be less than current formula of 90%. For example ext4 will
subtract "s_first_data_block plus internal journal blocks".

With recent change to e2fsprogs, overhead calculated in user-space
increased slightly and LTP test started failing:
  tytso/e2fsprogs

mkfs01 1 TPASS: 'mkfs -t ext4  /dev/loop0 ' passed.
mkfs01 2 TFAIL: 'mkfs -t ext4  /dev/loop0 16000' failed, not expected.

Since there's no strict rule how much the overhead will be,
as rule of thumb relax the condition to 70%.

Signed-off-by: zenghongling <zenghongling@kylinos.cn>
---
 testcases/commands/mkfs/mkfs01.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/commands/mkfs/mkfs01.sh b/testcases/commands/mkfs/mkfs01.sh
index 263aa47..a964774 100755
--- a/testcases/commands/mkfs/mkfs01.sh
+++ b/testcases/commands/mkfs/mkfs01.sh
@@ -66,11 +66,11 @@ mkfs_verify_size()
 	# 1k-block size should be devided by this argument for ntfs verification.
 	if [ "$1" = "ntfs" ]; then
 		local rate=1024/512
-		if [ $blocknum -lt "$(($2/$rate*8/10))" ]; then
+		if [ $blocknum -lt "$(($2/$rate*7/10))" ]; then
 			return 1
 		fi
 	else
-		if [ $blocknum -lt "$(($2*8/10))" ]; then
+		if [ $blocknum -lt "$(($2*7/10))" ]; then
 			return 1
 		fi
 	fi
-- 
2.1.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH] mkfs: relax size check
  2022-11-29  3:17 [LTP] [PATCH] mkfs: relax size check zenghongling
@ 2022-11-29 10:24 ` Petr Vorel
  2022-11-30  8:06   ` Petr Vorel
  0 siblings, 1 reply; 9+ messages in thread
From: Petr Vorel @ 2022-11-29 10:24 UTC (permalink / raw)
  To: zenghongling; +Cc: ltp

Hi zenghongling,

> Number of total data blocks in filesystem reported by statfs
> may be less than current formula of 90%. For example ext4 will
> subtract "s_first_data_block plus internal journal blocks".

> With recent change to e2fsprogs, overhead calculated in user-space increased
Do you know in which version it got changed?
Maybe it'd be worth to mention that to ext4 maintainers,
just to be sure it's not a regression.

> slightly and LTP test started failing: tytso/e2fsprogs
A bit cryptic description :(. You mean probably https://github.com/tytso/e2fsprogs
which is also on
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/

Kind regards,
Petr

> mkfs01 1 TPASS: 'mkfs -t ext4  /dev/loop0 ' passed.
> mkfs01 2 TFAIL: 'mkfs -t ext4  /dev/loop0 16000' failed, not expected.

> Since there's no strict rule how much the overhead will be,
> as rule of thumb relax the condition to 70%.

> Signed-off-by: zenghongling <zenghongling@kylinos.cn>
> ---
>  testcases/commands/mkfs/mkfs01.sh | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

> diff --git a/testcases/commands/mkfs/mkfs01.sh b/testcases/commands/mkfs/mkfs01.sh
> index 263aa47..a964774 100755
> --- a/testcases/commands/mkfs/mkfs01.sh
> +++ b/testcases/commands/mkfs/mkfs01.sh
> @@ -66,11 +66,11 @@ mkfs_verify_size()
>  	# 1k-block size should be devided by this argument for ntfs verification.
>  	if [ "$1" = "ntfs" ]; then
>  		local rate=1024/512
> -		if [ $blocknum -lt "$(($2/$rate*8/10))" ]; then
> +		if [ $blocknum -lt "$(($2/$rate*7/10))" ]; then
>  			return 1
>  		fi
>  	else
> -		if [ $blocknum -lt "$(($2*8/10))" ]; then
> +		if [ $blocknum -lt "$(($2*7/10))" ]; then
>  			return 1
>  		fi
>  	fi

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH] mkfs: relax size check
  2022-11-29 10:24 ` Petr Vorel
@ 2022-11-30  8:06   ` Petr Vorel
  2022-12-12 15:03     ` Richard Palethorpe
  0 siblings, 1 reply; 9+ messages in thread
From: Petr Vorel @ 2022-11-30  8:06 UTC (permalink / raw)
  To: zenghongling, ltp; +Cc: Richard Palethorpe

Hi all,

> Hi zenghongling,

> > Number of total data blocks in filesystem reported by statfs
> > may be less than current formula of 90%. For example ext4 will
> > subtract "s_first_data_block plus internal journal blocks".

> > With recent change to e2fsprogs, overhead calculated in user-space increased
> Do you know in which version it got changed?

For a record, zenghongling send html mail
https://lore.kernel.org/ltp/2oc1dehrobv-2oc577y0tt8@nsmail7.0.0--kylin--1/T/#u

thus repeat it here: the affected commit is here:
https://github.com/tytso/e2fsprogs/commit/59037c5357d39c6d0f14a0aff70e67dc13eafc84
which is from v1.46.0.

I'm testing it on openSUSE with 1.46.5 and it does not have problem.
Maybe there is some problem on the system you test and lower the barrier you
just hide it. Maybe others see it differently.

> Maybe it'd be worth to mention that to ext4 maintainers,
> just to be sure it's not a regression.

> > slightly and LTP test started failing: tytso/e2fsprogs
> A bit cryptic description :(. You mean probably https://github.com/tytso/e2fsprogs
> which is also on
> https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/

@zenghongling basic mailing list rules
1) sent text/plain (not text/html), otherwise mail is not readable
https://lore.kernel.org/ltp/2oc1dehrobv-2oc577y0tt8@nsmail7.0.0--kylin--1/T/#u
and not even in patchwork:
https://patchwork.ozlabs.org/project/ltp/patch/1669691831-23456-1-git-send-email-zenghongling@kylinos.cn/

Compare with my mail:
https://lore.kernel.org/ltp/Y4Xd4jd%2FX5zsmoqH@pevik/T/#m76d4ae3f396a6ae63382cb569c33d8c746ce0974

More instructions are:
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#no-mime-no-links-no-compression-no-attachments-just-plain-text

2) reply to mail thread so that mail is connected to the thread
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#explicit-in-reply-to-headers

Actually most of the reading for kernel applies to LTP as well
https://www.kernel.org/doc/html/latest/process/submitting-patches.html

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH] mkfs: relax size check
  2022-11-30  8:06   ` Petr Vorel
@ 2022-12-12 15:03     ` Richard Palethorpe
  0 siblings, 0 replies; 9+ messages in thread
From: Richard Palethorpe @ 2022-12-12 15:03 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp, zenghongling

Hello,

No response, setting to rejected in patchwork.

-- 
Thank you,
Richard.

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* [LTP] [PATCH] mkfs: relax size check
  2021-04-26 13:11 ` Li Wang
@ 2021-04-26 19:28   ` Petr Vorel
  0 siblings, 0 replies; 9+ messages in thread
From: Petr Vorel @ 2021-04-26 19:28 UTC (permalink / raw)
  To: ltp

Hi Jan, Li,

> On Fri, Apr 23, 2021 at 7:16 PM Jan Stancek <jstancek@redhat.com> wrote:

> > Number of total data blocks in filesystem reported by statfs
> > may be less than current formula of 90%. For example ext4 will
> > subtract "s_first_data_block plus internal journal blocks".

> > With recent change to e2fsprogs, overhead calculated in user-space
> > increased slightly and LTP test started failing:
> >   https://github.com/tytso/e2fsprogs/commit/59037c5357d39c6d0f14a0aff70e67dc13eafc84

> > Since there's no strict rule how much the overhead will be,
> > as rule of thumb relax the condition to 80%.

> > Signed-off-by: Jan Stancek <jstancek@redhat.com>

> Reviewed-by: Li Wang <liwang@redhat.com>

I dared to merge your fix. Thanks!

Kind regards,
Petr

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

* [LTP] [PATCH] mkfs: relax size check
  2021-04-23 11:16 Jan Stancek
  2021-04-23 15:06 ` Petr Vorel
@ 2021-04-26 13:11 ` Li Wang
  2021-04-26 19:28   ` Petr Vorel
  1 sibling, 1 reply; 9+ messages in thread
From: Li Wang @ 2021-04-26 13:11 UTC (permalink / raw)
  To: ltp

On Fri, Apr 23, 2021 at 7:16 PM Jan Stancek <jstancek@redhat.com> wrote:
>
> Number of total data blocks in filesystem reported by statfs
> may be less than current formula of 90%. For example ext4 will
> subtract "s_first_data_block plus internal journal blocks".
>
> With recent change to e2fsprogs, overhead calculated in user-space
> increased slightly and LTP test started failing:
>   https://github.com/tytso/e2fsprogs/commit/59037c5357d39c6d0f14a0aff70e67dc13eafc84
>
> Since there's no strict rule how much the overhead will be,
> as rule of thumb relax the condition to 80%.
>
> Signed-off-by: Jan Stancek <jstancek@redhat.com>

Reviewed-by: Li Wang <liwang@redhat.com>


-- 
Regards,
Li Wang


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

* [LTP] [PATCH] mkfs: relax size check
  2021-04-23 15:06 ` Petr Vorel
@ 2021-04-23 15:28   ` Petr Vorel
  0 siblings, 0 replies; 9+ messages in thread
From: Petr Vorel @ 2021-04-23 15:28 UTC (permalink / raw)
  To: ltp

Hi Jan,

> Yes, I also noticed mkfs01_ext3_sh and mkfs01_ext4_sh on mainline, this could
> help. Thanks!
Yes, it fixes the problem otherwise reproducible on openSUSE, which uses
e2fsprogs 1.46.2 with commit 59037c53.

Kind regards,
Petr

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

* [LTP] [PATCH] mkfs: relax size check
  2021-04-23 11:16 Jan Stancek
@ 2021-04-23 15:06 ` Petr Vorel
  2021-04-23 15:28   ` Petr Vorel
  2021-04-26 13:11 ` Li Wang
  1 sibling, 1 reply; 9+ messages in thread
From: Petr Vorel @ 2021-04-23 15:06 UTC (permalink / raw)
  To: ltp

Hi Jan,

Yes, I also noticed mkfs01_ext3_sh and mkfs01_ext4_sh on mainline, this could
help. Thanks!

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr

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

* [LTP] [PATCH] mkfs: relax size check
@ 2021-04-23 11:16 Jan Stancek
  2021-04-23 15:06 ` Petr Vorel
  2021-04-26 13:11 ` Li Wang
  0 siblings, 2 replies; 9+ messages in thread
From: Jan Stancek @ 2021-04-23 11:16 UTC (permalink / raw)
  To: ltp

Number of total data blocks in filesystem reported by statfs
may be less than current formula of 90%. For example ext4 will
subtract "s_first_data_block plus internal journal blocks".

With recent change to e2fsprogs, overhead calculated in user-space
increased slightly and LTP test started failing:
  https://github.com/tytso/e2fsprogs/commit/59037c5357d39c6d0f14a0aff70e67dc13eafc84

Since there's no strict rule how much the overhead will be,
as rule of thumb relax the condition to 80%.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
I haven't found better way to set the test expectation,
so to address immediate failures I propose to relax the check.

 testcases/commands/mkfs/mkfs01.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/commands/mkfs/mkfs01.sh b/testcases/commands/mkfs/mkfs01.sh
index 13491c9685ae..3e3e56719cf3 100755
--- a/testcases/commands/mkfs/mkfs01.sh
+++ b/testcases/commands/mkfs/mkfs01.sh
@@ -69,11 +69,11 @@ mkfs_verify_size()
 	# 1k-block size should be devided by this argument for ntfs verification.
 	if [ "$1" = "ntfs" ]; then
 		local rate=1024/512
-		if [ $blocknum -lt "$(($2/$rate*9/10))" ]; then
+		if [ $blocknum -lt "$(($2/$rate*8/10))" ]; then
 			return 1
 		fi
 	else
-		if [ $blocknum -lt "$(($2*9/10))" ]; then
+		if [ $blocknum -lt "$(($2*8/10))" ]; then
 			return 1
 		fi
 	fi
-- 
2.18.1


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

end of thread, other threads:[~2022-12-12 15:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-29  3:17 [LTP] [PATCH] mkfs: relax size check zenghongling
2022-11-29 10:24 ` Petr Vorel
2022-11-30  8:06   ` Petr Vorel
2022-12-12 15:03     ` Richard Palethorpe
  -- strict thread matches above, loose matches on Subject: below --
2021-04-23 11:16 Jan Stancek
2021-04-23 15:06 ` Petr Vorel
2021-04-23 15:28   ` Petr Vorel
2021-04-26 13:11 ` Li Wang
2021-04-26 19:28   ` Petr Vorel

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).