Actions
Bug #3348
openPanic when trying to mount_hammer2 a file
Start date:
03/30/2023
Due date:
% Done:
0%
Estimated time:
Description
Dragonfly 6.4.0.
Observed behavior: when I create a HAMMER2 file system on a regular file and try to mount it, I get a panic.
Expected behavior: Maybe the program should exit with an error message? I suspect I'm not supposed to do this kind of thing: the man page of mount_hammer2 says the file should be special.
To reproduce, as root:
truncate -s 1G hammer2.img
newfs_hammer2 hammer2.img
mkdir mnt
mount_hammer2 ~/hammer2.img mnt
This is the output after the last command:
hammer2_mount: devstr="/root/hammer2.img@DATA" hammer2_mount: device="/root/hammer2.img" label="DATA" rdonly=0 panic: assertion "strncmp(path, "/dev/", 5) == 0" failed in hammer2_init_devvp a t /usr/src/sys/vfs/hammer2/hammer2_ondisk.c:197 cpuid = 0 Trace beginning at frame 0xfffff800a9bbac18 hammer2_init_devvp() at hammer2_init_devvp+0x48b 0xffffffff8098589b hammer2_init_devvp() at hammer2_init_devvp+0x48b 0xffffffff8098589b hammer2_vfs_mount() at hammer2_vfs_mount+0x379 0xffffffff8096a4d9 sys_mount() at sys_mount+0x33b 0xffffffff80702d7b syscall2() at syscall2+0x11e 0xffffffff80bdc0ae Debugger("panic") CPU0 stopping CPUs: 0x00000000 stopped Stopped at Debugger+0x7c: movb $0,0xbcbd09(%rip) db>
No data to display
Actions