tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: vnd.c 1.254



    Date:        Sun, 17 Jan 2016 23:42:25 +0100
    From:        Manuel Bouyer <bouyer%antioche.eu.org@localhost>
    Message-ID:  <20160117224225.GA9174%asim.lip6.fr@localhost>

  | once again, I don't care. vnconfig -l in both cases lists busy and
  | free vnd devices, and from this list the user can pick a free device
  | for use. this is all what matters for the end user.

As it does in head.   Please remember that you have been testing with
a combination of kernel and vnconfig that is known to be sub-optimal.
vnconfig was fixed (in early November, the same time as the kernel was
changed) to deal with this.

Also note that while the combination you're running is sub-optimal, it
is far better than users using netbsd-6 userland with a netbsd-7
kernel experience.

If you really want vnconfig to list all the devices that you have in
/dev, then I think a simple script like this

	VND=$( ls /dev/vnd*d | sort -rn -k 1.7 | sed -e 1q )
	F=$( mktemp )
	dd if=/dev/zero of="$F" bs=1k count=100
	vnconfig "${VND}" "${F}"
	vnconfig -u "${VND}"
	rm -f "${F}"

should make that happen (using the vnconfig from head, or one from netbsd-6).
(This assumes vnds work on tmpfs, I have never tried, if not, use /var/tmp.)

After that, vnconfig -l should list all of the devices, I think.
Just run that script from rc.local (or somewhere like that, before
you will have used all your vnds).

And probably, you might want to add a little error checking (handle the case
where there are no vnds in /dev, or where mktemp fails, or ...)

kre



Home | Main Index | Thread Index | Old Index