-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ext2: add support to various inode sizes
the script used for generating test inputs: declare -A sizes=( [1024,128]=$(( 128000 + 1024)) [1024,256]=$(( 130048 + 1024)) [1024,512]=$(( 130048 + 1024)) [1024,1024]=$((130048 + 1024)) [2048,128]=$(( 34816 + 2048)) [2048,256]=$(( 36864 + 2048)) [2048,512]=$(( 36864 + 2048)) [2048,1024]=$(( 61440 + 2048)) [4096,128]=$(( 53248 + 4096)) [4096,256]=$(( 57344 + 4096)) [4096,512]=$(( 73728 + 4096)) [4096,1024]=$((106496 + 4096)) ) adjust_size() { local f=$1 local bsize=$2 local isize=$3 truncate --size=${sizes[$bsize,$isize]} $f } mkdir -p __tmp__ for bsize in 1024 2048 4096; do for isize in 128 256 512 1024; do f=tests/files/bsize-${bsize}-isize-${isize}.ext2 dd if=/dev/zero of=$f bs=${bsize} count=128 mkfs.ext2 -I ${isize} -b ${bsize} $f sudo mount $f __tmp__ echo hello | sudo dd if=/dev/stdin of=__tmp__/source (cd __tmp__/; sudo ln -s source target) sudo umount __tmp__ adjust_size $f $bsize $isize done done rmdir __tmp__ Signed-off-by: Masatake YAMATO <yamato@redhat.com>
- Loading branch information
Showing
14 changed files
with
18 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters