NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/59674: Unable to create wapbl journal on logical volume with NetBSD 11.0_BETA
>Number: 59674
>Category: kern
>Synopsis: Unable to create wapbl journal on logical volume with NetBSD 11.0_BETA
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Sep 28 20:25:01 +0000 2025
>Originator: Christof Meerwald
>Release: 11.0_BETA (Wed Sep 24 12:39:13 UTC 2025)
>Organization:
>Environment:
NetBSD hlcs 11.0_BETA NetBSD 11.0_BETA (GENERIC) #0: Wed Sep 24 12:39:13 UTC 2025 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
Mounting a newly created filesystem on a logical volume with the "log" option results in "Inappropriate ioctl for device".
see https://mail-index.netbsd.org/netbsd-users/2025/09/27/msg033178.html
https://mail-index.netbsd.org/netbsd-users/2025/09/28/msg033182.html
https://mail-index.netbsd.org/netbsd-users/2025/09/28/msg033183.html
https://mail-index.netbsd.org/netbsd-users/2025/09/28/msg033186.html
>How-To-Repeat:
Use NetBSD 11.0_BETA (or maybe HEAD)
- create a logical volume "vg-test"
- create a new filesystem on that logical volume: newfs -O2ea /dev/mapper/vg-test
- mount that filesystem with the "log" option: mount -o log /dev/mapper/vg-test /mnt
will likely result in "Inappropriate ioctl for device"
>Fix:
see https://mail-index.netbsd.org/netbsd-users/2025/09/28/msg033186.html for some analysis:
https://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/dm/dm_ioctl.c.diff?r1=1.56;r2=1.57;f=h
with this change (the second part of it) it now fails on NetBSD 11.0_BETA, but I think the change is actually good.
Where it actually fails is in "getdisksize": this does a DIOCGWEDGEINFO and then a disk_find on dkw.dkw_parent.
I think the issue is in the handling of DIOCGWEDGEINFO in dev/dm/device-mapper.c where it sets dkw->dkw_parent to dmv->name. Should that maybe also use device_xname(dmv->devt)? (and what should dkw->device_name be set to there?)
Home |
Main Index |
Thread Index |
Old Index