mirror of
https://github.com/psankar/simplefs.git
synced 2025-07-26 07:24:53 +02:00
simple-test: use losetup+journal_path=/dev/loopX for mounting with journal
This commit is contained in:
parent
cb833cd591
commit
3384ede4bd
@ -20,6 +20,7 @@ echo 1 >| /sys/module/jbd2/parameters/jbd2_debug
|
|||||||
root_pwd="$PWD"
|
root_pwd="$PWD"
|
||||||
test_dir="test-dir-$RANDOM"
|
test_dir="test-dir-$RANDOM"
|
||||||
test_mount_point="test-mount-point-$RANDOM"
|
test_mount_point="test-mount-point-$RANDOM"
|
||||||
|
test_journal_dev=""
|
||||||
|
|
||||||
function create_journal()
|
function create_journal()
|
||||||
{
|
{
|
||||||
@ -34,12 +35,14 @@ function create_test_image()
|
|||||||
function mount_fs_image()
|
function mount_fs_image()
|
||||||
{
|
{
|
||||||
insmod simplefs.ko
|
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
|
dmesg | tail -n20
|
||||||
}
|
}
|
||||||
function unmount_fs()
|
function unmount_fs()
|
||||||
{
|
{
|
||||||
umount "$1"
|
umount "$1"
|
||||||
|
losetup -d $test_journal_dev
|
||||||
rmmod simplefs.ko
|
rmmod simplefs.ko
|
||||||
dmesg | tail -n20
|
dmesg | tail -n20
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user