bin/60644: dump -X/-x: fssN search logic fails if snapshot is mounted

"[email protected] via gnats" <[email protected]>
Newsgroups gmane.os.netbsd.bugs
Message-ID <[email protected]>
>Number:         60644
>Category:       bin
>Synopsis:       dump -X/-x: fssN search logic fails if snapshot is mounted
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 25 21:25:00 +0000 2026
>Originator:     Taylor R Campbell
>Release:        current, 11, 10, 9, ...
>Organization:
The NetBusyDump Foundation, Inc.
>Environment:
>Description:

	For its -X/-x options to dump with a snapshot, dump(8) has
	logic to find a free /dev/fssN node for the snapshot, by
	opening them one by one and checking whether ioctl(FSSIOCSET)
	fails with EBUSY.

	However, if, before it has found a free node, it finds an
	fss(4) node that is not just configured but also _mounted_,
	then ioctl(FSSIOCTSET) will fail with EPERM instead of EBUSY,
	and so the loop will fail.

>How-To-Repeat:

	fssconfig fss0 / /
	mount /dev/fss0 /mnt
	dump -X -f /dev/null -0a /

>Fix:

	Yes, please!

	Really, the right thing here is probably to just bite the
	bullet and make /dev/fss a proper cloning device.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.