fi
}
-_test_remount()
+_test_cycle_mount()
{
_test_unmount
_test_mount
{
cd /
# we might get here with a RO FS
- _test_remount
+ _test_cycle_mount
# now remove fsstress directory.
# N.B. rm(1) on IRIX can find problems when building up a long pathname
# such that what it has is greater the 1024 chars and will
blksz=65536
_pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) $testdir/file1 >> $seqres.full
_pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) $testdir/file2 >> $seqres.full
-_test_remount
+_test_cycle_mount
md5sum $testdir/file1 | _filter_test_dir
md5sum $testdir/file2 | _filter_test_dir
free_before=$(stat -f -c '%a' $testdir)
_reflink_range $testdir/file1 $((blksz * 4)) $testdir/file2 \
$((blksz * 4)) $((blksz * 2)) >> $seqres.full
-_test_remount
+_test_cycle_mount
free_after=$(stat -f -c '%a' $testdir)
echo "freesp changed by $free_before -> $free_after" >> $seqres.full
blksz=65536
_pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) $testdir/file1 >> $seqres.full
_pwrite_byte 0x62 $((blksz * 2)) $((blksz * 6)) $testdir/file2 >> $seqres.full
-_test_remount
+_test_cycle_mount
md5sum $testdir/file1 | _filter_test_dir
md5sum $testdir/file2 | _filter_test_dir
free_before=$(stat -f -c '%a' $testdir)
_reflink_range $testdir/file1 $((blksz * 4)) $testdir/file2 \
$((blksz * 4)) $((blksz * 2)) >> $seqres.full
-_test_remount
+_test_cycle_mount
free_after=$(stat -f -c '%a' $testdir)
echo "freesp changed by $free_before -> $free_after" >> $seqres.full
_pwrite_byte 0x62 0 $((blksz * 8)) $testdir/file2 >> $seqres.full
_pwrite_byte 0x63 0 $((blksz * 8)) $testdir/file3 >> $seqres.full
_pwrite_byte 0x64 0 $((blksz * 8)) $testdir/file4 >> $seqres.full
-_test_remount
+_test_cycle_mount
md5sum $testdir/file1 | _filter_test_dir
md5sum $testdir/file2 | _filter_test_dir
free_before=$(stat -f -c '%a' $testdir)
_reflink_range $testdir/file1 0 $testdir/file2 0 $((blksz * 4)) >> $seqres.full
_reflink_range $testdir/file3 0 $testdir/file4 0 $((blksz * 4)) >> $seqres.full
-_test_remount
+_test_cycle_mount
free_after=$(stat -f -c '%a' $testdir)
echo "freesp changed by $free_before -> $free_after" >> $seqres.full
free_before=$(stat -f -c '%a' $testdir)
_reflink_range $testdir/file1 0 $testdir/file3 0 $((blksz * 2)) >> $seqres.full
_reflink_range $testdir/file1 0 $testdir/file4 0 $((blksz * 2)) >> $seqres.full
-_test_remount
+_test_cycle_mount
free_after=$(stat -f -c '%a' $testdir)
echo "freesp changed by $free_before -> $free_after" >> $seqres.full
blksz=65536
_pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) $testdir/file1 >> $seqres.full
_pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) $testdir/file2 >> $seqres.full
-_test_remount
+_test_cycle_mount
md5sum $testdir/file1 | _filter_test_dir
md5sum $testdir/file2 | _filter_test_dir
free_before=$(stat -f -c '%a' $testdir)
_dedupe_range $testdir/file1 $((blksz * 4)) $testdir/file2 \
$((blksz * 4)) $((blksz * 2)) >> $seqres.full
-_test_remount
+_test_cycle_mount
free_after=$(stat -f -c '%a' $testdir)
echo "freesp changed by $free_before -> $free_after" >> $seqres.full
blksz=65536
_pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) $testdir/file1 >> $seqres.full
_pwrite_byte 0x62 $((blksz * 2)) $((blksz * 6)) $testdir/file2 >> $seqres.full
-_test_remount
+_test_cycle_mount
md5sum $testdir/file1 | _filter_test_dir
md5sum $testdir/file2 | _filter_test_dir
free_before=$(stat -f -c '%a' $testdir)
_dedupe_range $testdir/file1 $((blksz * 4)) $testdir/file2 \
$((blksz * 4)) $((blksz * 2)) >> $seqres.full
-_test_remount
+_test_cycle_mount
free_after=$(stat -f -c '%a' $testdir)
echo "freesp changed by $free_before -> $free_after" >> $seqres.full
_pwrite_byte 0x61 0 $((blksz + 37)) $testdir/file2 >> $seqres.full
_pwrite_byte 0x62 0 $((blksz + 37)) $testdir/file3 >> $seqres.full
_pwrite_byte 0x62 0 $((blksz + 37)) $testdir/file4 >> $seqres.full
-_test_remount
+_test_cycle_mount
md5sum $testdir/file1 | _filter_test_dir
md5sum $testdir/file2 | _filter_test_dir
echo "Reflink the last blocks together, 1-2 1-3"
_reflink_range $testdir/file1 $blksz $testdir/file2 $blksz 37 >> $seqres.full
_reflink_range $testdir/file1 $blksz $testdir/file3 $blksz 37 >> $seqres.full
-_test_remount
+_test_cycle_mount
md5sum $testdir/file1 | _filter_test_dir
md5sum $testdir/file2 | _filter_test_dir
_pwrite_byte 0x61 0 $((blksz + 37)) $testdir/file2 >> $seqres.full
_pwrite_byte 0x62 0 $((blksz + 37)) $testdir/file3 >> $seqres.full
_pwrite_byte 0x62 0 $((blksz + 37)) $testdir/file4 >> $seqres.full
-_test_remount
+_test_cycle_mount
md5sum $testdir/file1 | _filter_test_dir
md5sum $testdir/file2 | _filter_test_dir
_dedupe_range $testdir/file1 $blksz $testdir/file2 $blksz 37 >> $seqres.full
echo "1->3"
_dedupe_range $testdir/file1 $blksz $testdir/file3 $blksz 37 >> $seqres.full
-_test_remount
+_test_cycle_mount
md5sum $testdir/file1 | _filter_test_dir
md5sum $testdir/file2 | _filter_test_dir
$((nr * 7 * blksz)) $blksz >> $seqres.full 2>&1
done
-_test_remount
+_test_cycle_mount
echo "Check block mappings"
md5sum $testdir/file1 | _filter_test_dir
_pwrite_byte 0x61 0 $((blksz * 48 - 3)) $testdir/file1 >> $seqres.full
_cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
_pwrite_byte 0x61 0 $((blksz * 48 - 3)) $testdir/file3 >> $seqres.full
-_test_remount
+_test_cycle_mount
echo "Compare files"
md5sum $testdir/file1 | _filter_test_dir
_pwrite_byte 0x62 $((blksz * 48 - 8)) 17 $testdir/file2 >> $seqres.full
_pwrite_byte 0x62 $((blksz * 48 - 8)) 17 $testdir/file3 >> $seqres.full
-_test_remount
+_test_cycle_mount
echo "Compare files"
md5sum $testdir/file1 | _filter_test_dir
_pwrite_byte 0x61 0 $((blksz * 48 - 3)) $testdir/file1 >> $seqres.full
_cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
_pwrite_byte 0x61 0 $((blksz * 48 - 3)) $testdir/file3 >> $seqres.full
-_test_remount
+_test_cycle_mount
echo "Compare files"
md5sum $testdir/file1 | _filter_test_dir
_pwrite_byte 0x62 $((blksz * 48)) $blksz $testdir/file2 -d >> $seqres.full
_pwrite_byte 0x62 $((blksz * 48)) $blksz $testdir/file3 -d >> $seqres.full
-_test_remount
+_test_cycle_mount
echo "Compare files"
md5sum $testdir/file1 | _filter_test_dir
_pwrite_byte 0x61 0 $((blksz * 48 - 3)) $testdir/file1 >> $seqres.full
_cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
_pwrite_byte 0x61 0 $((blksz * 48 - 3)) $testdir/file3 >> $seqres.full
-_test_remount
+_test_cycle_mount
echo "Compare files"
md5sum $testdir/file1 | _filter_test_dir
_mwrite_byte 0x62 $((blksz * 48 - 20)) 17 $((blksz * 48 - 3)) $testdir/file2 >> $seqres.full
_mwrite_byte 0x62 $((blksz * 48 - 20)) 17 $((blksz * 48 - 3)) $testdir/file3 >> $seqres.full
-_test_remount
+_test_cycle_mount
echo "Compare files"
md5sum $testdir/file1 | _filter_test_dir
nr=9
filesize=$((blksz * nr))
_pwrite_byte 0x61 0 $((blksz * 256)) $testdir/file1 >> $seqres.full
-_test_remount
+_test_cycle_mount
md5sum $testdir/file1 | _filter_test_dir
csum=$(_md5_checksum $testdir/file1)
seq 2 $nr | while read i; do
_cp_reflink $testdir/file1 $testdir/file$i
done
-_test_remount
+_test_cycle_mount
echo "Rewrite the copies"
seq 2 $nr | while read i; do
_pwrite_byte 0x62 0 $((blksz * 256)) $testdir/file$i >> $seqres.full
done
-_test_remount
+_test_cycle_mount
echo "Examine original file"
md5sum $testdir/file1 | _filter_test_dir
nr=9
filesize=$((blksz * nr))
_pwrite_byte 0x61 0 $((blksz * 256)) $testdir/file1 >> $seqres.full
-_test_remount
+_test_cycle_mount
md5sum $testdir/file1 | _filter_test_dir
csum=$(_md5_checksum $testdir/file1)
seq 2 $nr | while read i; do
_cp_reflink $testdir/file1 $testdir/file$i
done
-_test_remount
+_test_cycle_mount
echo "Rewrite the copies"
seq 2 $nr | while read i; do
_pwrite_byte 0x62 0 $((blksz * 256)) $testdir/file$i -d >> $seqres.full
done
-_test_remount
+_test_cycle_mount
echo "Examine original file"
md5sum $testdir/file1 | _filter_test_dir
$blksz >> $seqres.full
_cp_reflink $testdir/file1 $testdir/file5
-_test_remount
+_test_cycle_mount
echo "Compare sections"
md5sum $testdir/file1 | _filter_test_dir
$XFS_IO_PROG -f -c "falloc 0 $((blksz * 5))" $testdir/file2 >> $seqres.full
$XFS_IO_PROG -f -c "falloc 0 $((blksz * 5))" $testdir/file3 >> $seqres.full
$XFS_IO_PROG -f -c "falloc 0 $((blksz * 5))" $testdir/file4 >> $seqres.full
-_test_remount
+_test_cycle_mount
echo "Compare files"
md5sum $testdir/file1 | _filter_test_dir
_pwrite_byte 0x61 0 $blksz $testdir/file4.chk >> $seqres.full
_pwrite_byte 0x62 $blksz $blksz $testdir/file4.chk >> $seqres.full
_pwrite_byte 0x00 $((blksz * 2)) $blksz $testdir/file4.chk >> $seqres.full
-_test_remount
+_test_cycle_mount
md5sum $testdir/file1 | _filter_test_dir
md5sum $testdir/file2 | _filter_test_dir
$XFS_IO_PROG -f -c "fcollapse 0 $blksz" $testdir/file2
$XFS_IO_PROG -f -c "fcollapse $blksz $blksz" $testdir/file3
$XFS_IO_PROG -f -c "fcollapse $((blksz * 2)) $blksz" $testdir/file4
-_test_remount
+_test_cycle_mount
echo "Compare files"
md5sum $testdir/file1 | _filter_test_dir
_pwrite_byte 0x61 0 $blksz $testdir/file4.chk >> $seqres.full
_pwrite_byte 0x62 $blksz $blksz $testdir/file4.chk >> $seqres.full
_pwrite_byte 0x00 $((blksz * 2)) $blksz $testdir/file4.chk >> $seqres.full
-_test_remount
+_test_cycle_mount
md5sum $testdir/file1 | _filter_test_dir
md5sum $testdir/file2 | _filter_test_dir
$XFS_IO_PROG -f -c "fpunch 0 $blksz" $testdir/file2
$XFS_IO_PROG -f -c "fpunch $blksz $blksz" $testdir/file3
$XFS_IO_PROG -f -c "fpunch $((blksz * 2)) $blksz" $testdir/file4
-_test_remount
+_test_cycle_mount
echo "Compare files"
md5sum $testdir/file1 | _filter_test_dir
_pwrite_byte 0x62 $blksz $blksz $testdir/file4.chk >> $seqres.full
_pwrite_byte 0x00 $((blksz * 2)) $blksz $testdir/file4.chk >> $seqres.full
_pwrite_byte 0x63 $((blksz * 3)) $blksz $testdir/file4.chk >> $seqres.full
-_test_remount
+_test_cycle_mount
md5sum $testdir/file1 | _filter_test_dir
md5sum $testdir/file2 | _filter_test_dir
$XFS_IO_PROG -f -c "finsert 0 $blksz" $testdir/file2
$XFS_IO_PROG -f -c "finsert $blksz $blksz" $testdir/file3
$XFS_IO_PROG -f -c "finsert $((blksz * 2)) $blksz" $testdir/file4
-_test_remount
+_test_cycle_mount
echo "Compare files"
md5sum $testdir/file1 | _filter_test_dir
_pwrite_byte 0x61 0 $blksz $testdir/file3.chk >> $seqres.full
_pwrite_byte 0x62 $blksz 37 $testdir/file3.chk >> $seqres.full
_pwrite_byte 0x00 $((blksz + 37)) 3 $testdir/file3.chk >> $seqres.full
-_test_remount
+_test_cycle_mount
md5sum $testdir/file1 | _filter_test_dir
md5sum $testdir/file2 | _filter_test_dir
echo "truncate files"
$XFS_IO_PROG -f -c "truncate $((blksz + 34))" $testdir/file2
$XFS_IO_PROG -f -c "truncate $((blksz + 40))" $testdir/file3
-_test_remount
+_test_cycle_mount
echo "Compare files"
md5sum $testdir/file1 | _filter_test_dir
_pwrite_byte 0x61 0 $blksz $testdir/file4.chk >> $seqres.full
_pwrite_byte 0x62 $blksz $blksz $testdir/file4.chk >> $seqres.full
_pwrite_byte 0x00 $((blksz * 2)) $blksz $testdir/file4.chk >> $seqres.full
-_test_remount
+_test_cycle_mount
md5sum $testdir/file1 | _filter_test_dir
md5sum $testdir/file2 | _filter_test_dir
$XFS_IO_PROG -f -c "fzero 0 $blksz" $testdir/file2
$XFS_IO_PROG -f -c "fzero $blksz $blksz" $testdir/file3
$XFS_IO_PROG -f -c "fzero $((blksz * 2)) $blksz" $testdir/file4
-_test_remount
+_test_cycle_mount
echo "Compare files"
md5sum $testdir/file1 | _filter_test_dir
for i in `seq 2 $nr`; do
_cp_reflink $testdir/file1 $testdir/file.$i
done
-_test_remount
+_test_cycle_mount
free_blocks1=$(stat -f $testdir -c '%f')
_within_tolerance "free blocks after reflink" $free_blocks1 $free_blocks0 $margin -v
_cp_reflink $testdir/file1 $testdir/file.$i
done
_cp_reflink $testdir/file1 $testdir/survivor
-_test_remount
+_test_cycle_mount
free_blocks1=$(stat -f $testdir -c '%f')
echo "Delete most of the files"
rm -rf $testdir/file*
-_test_remount
+_test_cycle_mount
free_blocks2=$(stat -f $testdir -c '%f')
echo "Delete all the files"
rm -rf $testdir/*
-_test_remount
+_test_cycle_mount
free_blocks3=$(stat -f $testdir -c '%f')
#echo $free_blocks0 $free_blocks1 $free_blocks2 $free_blocks3
for i in `seq 2 $nr`; do
_cp_reflink $testdir/file1 $testdir/file$i
done
-_test_remount
+_test_cycle_mount
free_blocks1=$(stat -f $testdir -c '%f')
echo "Punch most of the blocks"
$XFS_IO_PROG -f -c "fpunch 0 $sz" $testdir/file2
$XFS_IO_PROG -f -c "fpunch 0 $((sz / 2))" $testdir/file3
$XFS_IO_PROG -f -c "fpunch $((sz / 2)) $((sz / 2))" $testdir/file4
-_test_remount
+_test_cycle_mount
free_blocks2=$(stat -f $testdir -c '%f')
echo "Punch all the files"
$XFS_IO_PROG -f -c "fpunch 0 $sz" $testdir/file$i
done
$XFS_IO_PROG -f -c "fpunch 0 $sz" $testdir/file1
-_test_remount
+_test_cycle_mount
free_blocks3=$(stat -f $testdir -c '%f')
#echo $free_blocks0 $free_blocks1 $free_blocks2 $free_blocks3
nr=4
filesize=$((blksz * nr))
_pwrite_byte 0x61 0 $sz $testdir/file1 >> $seqres.full
-_test_remount
+_test_cycle_mount
echo "Create the reflink copies"
for i in `seq 2 $nr`; do
_cp_reflink $testdir/file1 $testdir/file$i
done
-_test_remount
+_test_cycle_mount
free_blocks1=$(stat -f $testdir -c '%f')
echo "Collapse most of the blocks"
$XFS_IO_PROG -f -c "fcollapse 0 $(((blks - 1) * blksz))" $testdir/file2
$XFS_IO_PROG -f -c "fcollapse 0 $((sz / 2))" $testdir/file3
$XFS_IO_PROG -f -c "fcollapse $((sz / 2)) $(( ((blks / 2) - 1) * blksz))" $testdir/file4
-_test_remount
+_test_cycle_mount
free_blocks2=$(stat -f $testdir -c '%f')
echo "Collpase nearly all the files"
$XFS_IO_PROG -f -c "fcollapse 0 $(( ((blks / 2) - 1) * blksz))" $testdir/file3
$XFS_IO_PROG -f -c "fcollapse 0 $((sz / 2))" $testdir/file4
$XFS_IO_PROG -f -c "fcollapse 0 $(( (blks - 1) * blksz))" $testdir/file1
-_test_remount
+_test_cycle_mount
free_blocks3=$(stat -f $testdir -c '%f')
#echo $free_blocks0 $free_blocks1 $free_blocks2 $free_blocks3
filesize=$((blksz * nr))
sz=$((blks * blksz))
_pwrite_byte 0x61 0 $sz $testdir/file1 >> $seqres.full
-_test_remount
+_test_cycle_mount
echo "Create the reflink copies"
for i in `seq 2 $nr`; do
_cp_reflink $testdir/file1 $testdir/file$i
done
-_test_remount
+_test_cycle_mount
free_blocks1=$(stat -f $testdir -c '%f')
echo "Rewrite some of the blocks"
_pwrite_byte 0x62 0 $sz $testdir/file2 >> $seqres.full
_pwrite_byte 0x63 0 $((sz / 2)) $testdir/file3 >> $seqres.full
_pwrite_byte 0x64 $((sz / 2)) $((sz / 2)) $testdir/file4 >> $seqres.full
-_test_remount
+_test_cycle_mount
free_blocks2=$(stat -f $testdir -c '%f')
echo "Rewrite all the files"
_pwrite_byte 0x62 0 $sz $testdir/file2 >> $seqres.full
_pwrite_byte 0x63 0 $sz $testdir/file3 >> $seqres.full
_pwrite_byte 0x64 0 $sz $testdir/file4 >> $seqres.full
-_test_remount
+_test_cycle_mount
free_blocks3=$(stat -f $testdir -c '%f')
echo "Rewrite the original file"
_pwrite_byte 0x65 0 $sz $testdir/file1 >> $seqres.full
-_test_remount
+_test_cycle_mount
free_blocks4=$(stat -f $testdir -c '%f')
#echo $free_blocks0 $free_blocks1 $free_blocks2 $free_blocks3 $free_blocks4
nr=4
filesize=$((blksz * nr))
_pwrite_byte 0x61 0 $sz $testdir/file1 >> $seqres.full
-_test_remount
+_test_cycle_mount
echo "Create the reflink copies"
for i in `seq 2 $nr`; do
_cp_reflink $testdir/file1 $testdir/file$i
done
-_test_remount
+_test_cycle_mount
free_blocks1=$(stat -f $testdir -c '%f')
echo "Rewrite some of the blocks"
$XFS_IO_PROG -f -c "fzero 0 $sz" $testdir/file2 >> $seqres.full
_pwrite_byte 0x63 0 $((sz / 2)) $testdir/file3 -d >> $seqres.full
_mwrite_byte 0x64 $((sz / 2)) $((sz / 2)) $sz $testdir/file4 >> $seqres.full
-_test_remount
+_test_cycle_mount
free_blocks2=$(stat -f $testdir -c '%f')
echo "Rewrite all the files"
_pwrite_byte 0x62 0 $sz $testdir/file2 -d >> $seqres.full
_mwrite_byte 0x63 0 $sz $sz $testdir/file3 >> $seqres.full
$XFS_IO_PROG -f -c "fzero 0 $sz" $testdir/file4 >> $seqres.full
-_test_remount
+_test_cycle_mount
free_blocks3=$(stat -f $testdir -c '%f')
echo "Rewrite the original file"
_pwrite_byte 0x65 0 $sz $testdir/file1 >> $seqres.full
-_test_remount
+_test_cycle_mount
free_blocks4=$(stat -f $testdir -c '%f')
#echo $free_blocks0 $free_blocks1 $free_blocks2 $free_blocks3 $free_blocks4
nr=4
filesize=$((blksz * nr))
_pwrite_byte 0x61 0 $sz $testdir/file1 >> $seqres.full
-_test_remount
+_test_cycle_mount
echo "Create the reflink copies"
for i in `seq 2 $nr`; do
_cp_reflink $testdir/file1 $testdir/file$i
done
-_test_remount
+_test_cycle_mount
free_blocks1=$(stat -f $testdir -c '%f')
echo "funshare part of a file"
$XFS_IO_PROG -f -c "falloc 0 $((sz / 2))" $testdir/file2
-_test_remount
+_test_cycle_mount
echo "funshare some of the copies"
$XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file2
$XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file3
-_test_remount
+_test_cycle_mount
free_blocks2=$(stat -f $testdir -c '%f')
echo "funshare the rest of the files"
$XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file4
$XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file1
-_test_remount
+_test_cycle_mount
free_blocks3=$(stat -f $testdir -c '%f')
echo "Rewrite the original file"
_pwrite_byte 0x65 0 $sz $testdir/file1 >> $seqres.full
-_test_remount
+_test_cycle_mount
free_blocks4=$(stat -f $testdir -c '%f')
#echo $free_blocks0 $free_blocks1 $free_blocks2 $free_blocks3 $free_blocks4
_pwrite_byte 0x61 0 $filesize $testdir/file1 >> $seqres.full
_cp_reflink $testdir/file1 $testdir/file2
-_test_remount
+_test_cycle_mount
md5sum $testdir/file1 | _filter_test_dir
md5sum $testdir/file2 | _filter_test_dir
echo "Write and punch"
_pwrite_byte 0x62 0 $((blksz * 256)) $testdir/file2 >> $seqres.full
$XFS_IO_PROG -f -c "fpunch $blksz $((blksz * 254))" $testdir/file2
-_test_remount
+_test_cycle_mount
echo "Compare results"
md5sum $testdir/file1 | _filter_test_dir
_pwrite_byte 0x61 0 $((blksz * 3)) $testdir/file2.chk >> $seqres.full
_pwrite_byte 0x00 $((blksz - 17)) $((blksz + 17)) $testdir/file2.chk >> $seqres.full
-_test_remount
+_test_cycle_mount
md5sum $testdir/file1 | _filter_test_dir
md5sum $testdir/file2 | _filter_test_dir
echo "fpunch files"
$XFS_IO_PROG -f -c "fpunch $((blksz - 17)) $((blksz + 17))" $testdir/file2
-_test_remount
+_test_cycle_mount
echo "Compare files"
md5sum $testdir/file1 | _filter_test_dir
_pwrite_byte 0x61 0 $((blksz * 3)) $testdir/file2.chk >> $seqres.full
_pwrite_byte 0x00 $((blksz - 17)) $((blksz + 17)) $testdir/file2.chk >> $seqres.full
-_test_remount
+_test_cycle_mount
md5sum $testdir/file1 | _filter_test_dir
md5sum $testdir/file2 | _filter_test_dir
echo "fzero files"
$XFS_IO_PROG -f -c "fzero $((blksz - 17)) $((blksz + 17))" $testdir/file2
-_test_remount
+_test_cycle_mount
echo "Compare files"
md5sum $testdir/file1 | _filter_test_dir
_pwrite_byte 0x62 0 $((blksz * 2)) $testdir/file2.chk >> $seqres.full
_pwrite_byte 0x61 $((blksz * 2)) $((blksz * 255)) $testdir/file2.chk >> $seqres.full
_reflink_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) 0 >> $seqres.full
-_test_remount
+_test_cycle_mount
md5sum $testdir/file1 | _filter_test_dir
md5sum $testdir/file2 | _filter_test_dir
_pwrite_byte 0x62 0 $((blksz * 257)) $testdir/file2 >> $seqres.full
_pwrite_byte 0x62 0 $((blksz * 257)) $testdir/file2.chk >> $seqres.full
_dedupe_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) 0 >> $seqres.full
-_test_remount
+_test_cycle_mount
md5sum $testdir/file1 | _filter_test_dir
md5sum $testdir/file2 | _filter_test_dir
_pwrite_byte 0x61 0 $((blksz * 256)) $testdir/file2 >> $seqres.full
_pwrite_byte 0x61 0 $((blksz * 256)) $testdir/file2.chk >> $seqres.full
_dedupe_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) 0 >> $seqres.full
-_test_remount
+_test_cycle_mount
md5sum $testdir/file1 | _filter_test_dir
md5sum $testdir/file2 | _filter_test_dir
_pwrite_byte 0x61 0 $((blksz * 257)) $testdir/file2 >> $seqres.full
_pwrite_byte 0x61 0 $((blksz * 257)) $testdir/file2.chk >> $seqres.full
_dedupe_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) 0 >> $seqres.full
-_test_remount
+_test_cycle_mount
md5sum $testdir/file1 | _filter_test_dir
md5sum $testdir/file2 | _filter_test_dir
_reflink_range $testdir/file2 $bigoff_64k $testdir/file9 0 $bigoff_64k >> $seqres.full
echo "Check file creation"
-_test_remount
+_test_cycle_mount
echo "file3"
$XFS_IO_PROG -c "pread -v -q $bigoff 1" $testdir/file3
echo "file4"
_dedupe_range $testdir/file2 $bigoff_64k $testdir/file9 0 $bigoff_64k >> $seqres.full
echo "Check file creation"
-_test_remount
+_test_cycle_mount
echo "file3"
$XFS_IO_PROG -c "pread -v -q $bigoff 1" $testdir/file3
echo "file4"
_cp_reflink $testdir/file1 $testdir/file2
_cp_reflink $testdir/file2 $testdir/file3
_cp_reflink $testdir/file3 $testdir/file4
-_test_remount
+_test_cycle_mount
free_blocks1=$(stat -f $testdir -c '%f')
md5sum $testdir/file1 | _filter_scratch
echo "CoW the reflink copies"
_pwrite_byte 0x62 $blksz $blksz $testdir/file2 >> $seqres.full
_pwrite_byte 0x63 $(( blksz * (blks - 1) )) $blksz $testdir/file3 >> $seqres.full
-_test_remount
+_test_cycle_mount
free_blocks2=$(stat -f $testdir -c '%f')
md5sum $testdir/file1 | _filter_scratch
xfs_fsr -v -d $testdir/file2 >> $seqres.full # fsr probably breaks the link
xfs_fsr -v -d $testdir/file3 >> $seqres.full # fsr probably breaks the link
xfs_fsr -v -d $testdir/file4 >> $seqres.full # fsr probably ignores this file
-_test_remount
+_test_cycle_mount
free_blocks3=$(stat -f $testdir -c '%f')
md5sum $testdir/file1 | _filter_scratch
nr=4
filesize=$((blksz * nr))
_pwrite_byte 0x61 0 $sz $testdir/file1 >> $seqres.full
-_test_remount
+_test_cycle_mount
echo "Create the reflink copies"
for i in `seq 2 $nr`; do
_cp_reflink $testdir/file1 $testdir/file$i
done
-_test_remount
+_test_cycle_mount
free_blocks1=$(stat -f $testdir -c '%f')
lsattr -l $testdir/ | _filter_test_dir | _filter_spaces
echo "funshare part of a file"
$XFS_IO_PROG -f -c "falloc 0 $((sz / 2))" $testdir/file2
-_test_remount
+_test_cycle_mount
lsattr -l $testdir/ | _filter_test_dir | _filter_spaces
echo "funshare some of the copies"
$XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file2
$XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file3
-_test_remount
+_test_cycle_mount
free_blocks2=$(stat -f $testdir -c '%f')
lsattr -l $testdir/ | _filter_test_dir | _filter_spaces
echo "funshare the rest of the files"
$XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file4
$XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file1
-_test_remount
+_test_cycle_mount
free_blocks3=$(stat -f $testdir -c '%f')
lsattr -l $testdir/ | _filter_test_dir | _filter_spaces
echo "Rewrite the original file"
_pwrite_byte 0x65 0 $sz $testdir/file1 >> $seqres.full
-_test_remount
+_test_cycle_mount
free_blocks4=$(stat -f $testdir -c '%f')
lsattr -l $testdir/ | _filter_test_dir | _filter_spaces
#echo $free_blocks0 $free_blocks1 $free_blocks2 $free_blocks3 $free_blocks4