4 # Create a bunch of small files at once, then delete half of them.
5 # The file size is less than the segment size.
6 # This forces live blocks in half-empty segments.
7 # If the filesystem is small enough, the cleaner will have to run in
8 # order for this to complete.
10 # Argument is directory in which to run.
12 echo -n "making small files: "
13 for i
in 0 1 2 3 4 5 6 7 8 9 a b c d e f
18 dd if=/dev
/zero of
=$1/f
$i$j bs
=65536 count
=1 >/dev
/null
2>&1
25 echo "Sleeping for 10 seconds...."
28 echo "Trying with another half meg; expect 'no space on device'"
29 dd if=/dev
/zero of
=$1/f61 bs
=512 count
=1024 >/dev
/null || true