Skip to content

Commit

Permalink
simple-test: use losetup+journal_path=/dev/loopX for mounting with jo…
Browse files Browse the repository at this point in the history
…urnal
  • Loading branch information
azat committed Oct 1, 2014
1 parent cb833cd commit 3384ede
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion simple-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ echo 1 >| /sys/module/jbd2/parameters/jbd2_debug
root_pwd="$PWD"
test_dir="test-dir-$RANDOM"
test_mount_point="test-mount-point-$RANDOM"
test_journal_dev=""

function create_journal()
{
Expand All @@ -34,12 +35,14 @@ function create_test_image()
function mount_fs_image()
{
insmod simplefs.ko
mount -o loop,owner,group,users,journal_path="$1" -t simplefs "$2" "$3"
test_journal_dev=$(losetup -f --show "$1")
mount -o loop,owner,group,users,journal_path="$test_journal_dev" -t simplefs "$2" "$3"
dmesg | tail -n20
}
function unmount_fs()
{
umount "$1"
losetup -d $test_journal_dev
rmmod simplefs.ko
dmesg | tail -n20
}
Expand Down

0 comments on commit 3384ede

Please sign in to comment.