<p>Hi Peter:</p>
<p> <br>> With recent change to e2fsprogs, overhead calculated in user-space increased<br>Do you know in which version it got changed?<br> You can reference <a href="https://github.com/tytso/e2fsprogs/commit/59037c5357d39c6d0f14a0aff70e67dc13eafc84">https://github.com/tytso/e2fsprogs/commit/59037c5357d39c6d0f14a0aff70e67dc13eafc84</a></p>
<p>I tested on my platform(arm/x86), found the </p>
<p>df -P -B 1k mntpoint | tail -n1 | awk '{print $2}'</p>
<p>the value is less than size 8*10</p>
<p>change to "7" can pass.</p>
<p> </p>
<p>There's no strict rule how much the overhead will be and no abnormal for e2fsprogs test,So relax the condition to 70%</p>
<p>to pass the mkfs interface test.</p>
<p> </p>
<p>Thanks!<br>----</p>
<div id="cs2c_mail_sigature"></div>
<p> </p>
<div id="re" style="margin-left: 0.5em; padding-left: 0.5em; border-left: 1px solid green;"><br><br><br>
<div style="background-color: #f5f7fa;"><strong>主 题:</strong><span id="subject">Re: [LTP] [PATCH] mkfs: relax size check</span> <br><strong>日 期:</strong><span id="date">2022-11-29 18:24</span> <br><strong>发件人:</strong><span id="from">Petr Vorel</span> <br><strong>收件人:</strong><span id="to" style="word-break: break-all;">曾红玲;</span></div>
<br>
<div id="content">
<div class="viewer_part" style="position: relative; overflow: hidden;">
<div>Hi zenghongling,<br><br>> Number of total data blocks in filesystem reported by statfs<br>> may be less than current formula of 90%. For example ext4 will<br>> subtract "s_first_data_block plus internal journal blocks".<br><br>> With recent change to e2fsprogs, overhead calculated in user-space increased<br>Do you know in which version it got changed?<br>Maybe it'd be worth to mention that to ext4 maintainers,<br>just to be sure it's not a regression.<br><br>> slightly and LTP test started failing: tytso/e2fsprogs<br>A bit cryptic description :(. You mean probably https://github.com/tytso/e2fsprogs<br>which is also on<br>https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/<br><br>Kind regards,<br>Petr<br><br>> mkfs01 1 TPASS: 'mkfs -t ext4 /dev/loop0 ' passed.<br>> mkfs01 2 TFAIL: 'mkfs -t ext4 /dev/loop0 16000' failed, not expected.<br><br>> Since there's no strict rule how much the overhead will be,<br>> as rule of thumb relax the condition to 70%.<br><br>> Signed-off-by: zenghongling <br>> ---<br>> testcases/commands/mkfs/mkfs01.sh | 4 ++--<br>> 1 file changed, 2 insertions(+), 2 deletions(-)<br><br>> diff --git a/testcases/commands/mkfs/mkfs01.sh b/testcases/commands/mkfs/mkfs01.sh<br>> index 263aa47..a964774 100755<br>> --- a/testcases/commands/mkfs/mkfs01.sh<br>> +++ b/testcases/commands/mkfs/mkfs01.sh<br>> @@ -66,11 +66,11 @@ mkfs_verify_size()<br>> # 1k-block size should be devided by this argument for ntfs verification.<br>> if [ "$1" = "ntfs" ]; then<br>> local rate=1024/512<br>> - if [ $blocknum -lt "$(($2/$rate*8/10))" ]; then<br>> + if [ $blocknum -lt "$(($2/$rate*7/10))" ]; then<br>> return 1<br>> fi<br>> else<br>> - if [ $blocknum -lt "$(($2*8/10))" ]; then<br>> + if [ $blocknum -lt "$(($2*7/10))" ]; then<br>> return 1<br>> fi<br>> fi</div>
</div>
</div>
</div>