1#!/bin/bash 2 3MNT=/mnt 4FS=/tmp/foo.img 5 6cp /dev/null $FS 7mke2fs -q -t ext4 -O inline_data,^has_journal -I 256 -b 4096 -N 64 $FS 256 8mount -t ext4 $FS $MNT 9ln -s symlink_data $MNT/symlink 10for i in 30 70 500 1023 1024; do 11 ln -s /$(perl -e "print 'x' x $i;") $MNT/l_$i 12done 13touch $MNT/acl 14setfacl -m u:daemon:r $MNT/acl 15setfacl -m u:bin:rx $MNT/acl 16setfacl -m g:mail:rw $MNT/acl 17setfacl -m g:daemon:r $MNT/acl 18touch $MNT/simple_acl 19setfacl -m u:daemon:r $MNT/simple_acl 20touch $MNT/xattr 21attr -q -s foo -V bar $MNT/xattr 22echo -e "one\n\ttwo" | attr -q -s quux $MNT/xattr 23echo -e "abc\001\002\003" | attr -q -s def $MNT/xattr 24echo file_data > $MNT/small_inline 25a="I am a very model of a modern major general;" 26a="$a I've information vegetable, animal and mineral" 27echo $a > $MNT/big_inline 28mkdir $MNT/sdir 29touch $MNT/sdir/1 30touch $MNT/sdir/2 31touch $MNT/sdir/3 32touch $MNT/sdir/4 33mkdir $MNT/mdir 34touch $MNT/mdir/1 35touch $MNT/mdir/2 36touch $MNT/mdir/3 37touch $MNT/mdir/4 38touch $MNT/mdir/5 39umount $MNT 40e2fsck -fp $FS 41