From c708a6d000fb26d17773dfdf0bee96d433f18b08 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 20 Oct 2009 17:47:23 +0200 Subject: mkfs_ext2: further work on small images Signed-off-by: Denys Vlasenko --- util-linux/mkfs_ext2_test.sh | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) (limited to 'util-linux/mkfs_ext2_test.sh') diff --git a/util-linux/mkfs_ext2_test.sh b/util-linux/mkfs_ext2_test.sh index 4bc5f1ea9..a636de561 100755 --- a/util-linux/mkfs_ext2_test.sh +++ b/util-linux/mkfs_ext2_test.sh @@ -45,31 +45,30 @@ test_mke2fs() { # -:bbox +:standard -# kilobytes=60 is the minimal allowed size. -# -# kilobytes=8378 is the first value where we differ from std: -# +warning: 185 blocks unused -# Filesystem label= -# OS type: Linux -# Block size=1024 (log=0) -# Fragment size=1024 (log=0) -# -2096 inodes, 8378 blocks -# +2096 inodes, 8193 blocks -# 418 blocks reserved for the super user -# First data block=1 -# -2 block groups -# +1 block groups -# 8192 blocks per group, 8192 fragments per group -# -1048 inodes per group -# -Superblock backups stored on blocks: -# -8193 -# +2096 inodes per group -# +# kilobytes=60 is the minimal allowed size kilobytes=60 while true; do test_mke2fs || exit 1 : $((kilobytes++)) - test $kilobytes = 300000 && break + test $kilobytes = 200 && break +done + +# Transition from one block group to two +# fails in [8378..8410] range +kilobytes=$((8*1024 - 20)) +while true; do + test_mke2fs #|| exit 1 + : $((kilobytes++)) + test $kilobytes = $((8*1024 + 300)) && break +done + +# Transition from two block groups to three +# works +kilobytes=$((16*1024 - 40)) +while true; do + test_mke2fs || exit 1 + : $((kilobytes++)) + test $kilobytes = $((16*1024 + 500)) && break done exit -- cgit v1.2.3