common/log: add _get_log_configs for testing options

This patch adds _get_log_configs for xfs and f2fs to test several
mount options for:

  xfs/086
* xfs/087

In xfs/087, one more test was added, so 10 tests will be done in
total.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
Jaegeuk Kim
2015-02-12 14:22:11 +11:00
committed by Dave Chinner
parent 56c0daca92
commit fca6b88d7b
4 changed files with 91 additions and 27 deletions
+47
View File
@@ -510,5 +510,52 @@ _require_logstate()
esac
}
_xfs_log_config()
{
echo "# mkfs-opt mount-opt"
echo "# ------------------------------"
echo " version=2 logbsize=32k"
echo " version=2,su=4096 logbsize=32k"
echo " version=2,su=32768 logbsize=32k"
echo " version=2,su=32768 logbsize=64k"
echo " version=2 logbsize=64k"
echo " version=2,su=64k logbsize=64k"
echo " version=2 logbsize=128k"
echo " version=2,su=128k logbsize=128k"
echo " version=2 logbsize=256k"
echo " version=2,su=256k logbsize=256k"
}
_f2fs_log_config()
{
echo "# mkfs-opt mount-opt"
echo "# ------------------------------"
echo " test1 active_logs=6,background_gc=off"
echo " test2 active_logs=6,background_gc=off,inline_data"
echo " test3 active_logs=6,background_gc=off,inline_dentry"
echo " test4 active_logs=6,background_gc=off,inline_data,inline_dentry"
echo " test5 active_logs=6,background_gc=off,disable_roll_forward"
echo " test6 active_logs=6,background_gc=off,discard,inline_data,inline_dentry"
echo " test7 active_logs=6,background_gc=on"
echo " test8 active_logs=6,background_gc=on,inline_data"
echo " test9 active_logs=6,background_gc=on,inline_data,inline_dentry"
echo " test10 active_logs=6,background_gc=on,discard,inline_data,inline_dentry"
}
_get_log_configs()
{
case "$FSTYP" in
xfs)
_xfs_log_config
;;
f2fs)
_f2fs_log_config
;;
*)
_notrun "$FSTYP does not support log configs."
;;
esac
}
# make sure this script returns success
/bin/true
+1 -14
View File
@@ -51,20 +51,7 @@ _require_v2log
echo "*** init FS"
umount $SCRATCH_DEV >/dev/null 2>&1
cat >$tmp.seq.params <<EOF
# mkfs-opt mount-opt
# ------------------------------
version=2 logbsize=32k
version=2,su=4096 logbsize=32k
version=2,su=32768 logbsize=32k
version=2,su=32768 logbsize=64k
version=2 logbsize=64k
version=2,su=64k logbsize=64k
version=2 logbsize=128k
version=2,su=128k logbsize=128k
version=2 logbsize=256k
version=2,su=256k logbsize=256k
EOF
_get_log_configs > $tmp.seq.params
# Do the work for various log params which
# should not effect the data content of the log
+1 -13
View File
@@ -67,19 +67,7 @@ _require_xfs_quota
echo "*** init FS"
umount $SCRATCH_DEV >/dev/null 2>&1
cat >$tmp.seq.params <<EOF
# mkfs-opt mount-opt
# ------------------------------
version=2 logbsize=32k
version=2,su=4096 logbsize=32k
version=2,su=32768 logbsize=32k
version=2 logbsize=64k
version=2,su=64k logbsize=64k
version=2 logbsize=128k
version=2,su=128k logbsize=128k
version=2 logbsize=256k
version=2,su=256k logbsize=256k
EOF
_get_log_configs > $tmp.seq.params
cat $tmp.seq.params \
| while read mkfs mnt restofline
+42
View File
@@ -378,3 +378,45 @@ clean log
*** filesystem is checked ok ***
*** mkfs ***
*** mount ***
*** calling fsstress -p 4 -z -f rmdir=10 -f link=10 -f creat=10 -f mkdir=10 -f rename=30 -f stat=30 -f unlink=30 -f truncate=20 -m8 -n 10000 ***
*** ls -RF SCRATCH_MNT ***
*** godown ***
*** unmount ***
*** logprint after going down... ***
dirty log
*** mount with replay ***
*** ls -RF SCRATCH_MNT ***
*** diff ls before and after ***
Files TMP.ls1 and TMP.ls2 are identical
*** unmount ***
*** logprint after mount and replay... ***
clean log
*** filesystem is checked ok ***