mkfs: relax size check
PATCH 1/1 mkfs: relax size check
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%.
---
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(-)
testcases/commands/mkfs/mkfs01.sh +2 -2
@@ -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
Signature · 1 line
2.18.1
PATCH 1/1 mkfs: relax size check
Hi Jan,
Yes, I also noticed mkfs01_ext3_sh and mkfs01_ext4_sh on mainline, this could help. Thanks!
Kind regards,
Petr
PATCH 1/1 mkfs: relax size check
Hi Jan,
Quoted 2 lines
Yes, I also noticed
mkfs01_ext3_shandmkfs01_ext4_shon 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
PATCH 1/1 mkfs: relax size check
In reply to Jan StancekQuoted 5 lines · Jan Stancek
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_blockplus internal journal blocks".
Quoted 8 lines
With recent change to e2fsprogs, overhead calculated in user-space increased slightly and LTP test started failing:
https://github.com/tytso/e2fsprogs/commit/59037c5357d39c6d0f14a0aff70e67dc13eafc84Since 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 <[email protected]>
Signature · 2 lines
Regards, Li Wang
PATCH 1/1 mkfs: relax size check
Hi Jan, Li,
Quoted 10 lines · Jan Stancek
Quoted 8 lines
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_blockplus 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
Quoted 6 lines
Quoted 4 lines
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 <[email protected]>Reviewed-by Li Wang <[email protected]>
I dared to merge your fix. Thanks!
Kind regards,
Petr