tech-kern archive

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

Re: vnd.c 1.254



On Sun, Jan 17, 2016 at 01:01:23PM +0700, Robert Elz wrote:
>     Date:        Sat, 16 Jan 2016 23:27:51 +0100
>     From:        Manuel Bouyer <bouyer%antioche.eu.org@localhost>
>     Message-ID:  <20160116222751.GA2083%asim.lip6.fr@localhost>
> 
>   | Also, you don't address the problem that, as I understand it and if
>   | the code works properly, vnconfig -l won't show free devices if the
>   | first 4 are in use.
> 
> Arguably it shouldn't show any free devices at all, otherwise, where
> should it stop?   The correct answer to "which vnd is free?" is "any
> vnd that is not is use."   Attempting to enumerate them all is folly.

This is how vnconfig -l has been working for a long time.

> 
> The current scheme (I believe) lists a vnd as free (not in use) if
> some higher vnd is (or has been) used, and stops when the highest one
> ever used is reached.   Or at least that's the intent.   But removing
> all of the output for unused vnds would probably be a good idea.
> 
> If you want to know what is configured in /dev, then "ls /dev/vnd*d"
> will show you that, but there is no particular reason that vnd's
> (or any devices) need to exist in /dev (consider in a chroot partition,
> which might have /dev/vnd23[a-p] only)

This is how the netbsd-7 vnconfig -l is working (I've not looked at older
releases). It enumerates the vnd devices in /dev/ and queries the kernel
only for them.
HEAD has been changed, which means that HEAD won't list free devices
which exists in /dev. I think this behavior is brocken.

> 
> There original problem was caused with the way vn{d}config was hacked
> to handle -l when vnd was made cloning (that lost backward compat to
> netbsd 6, which was the bug reported which the fixes in question were
> handling).  But there was no way to fix vnd and vn{d}config that would
> retain 100% backward compat in all cases.  Since NetBSD 7 was so new,
> some compat was lost just for it, you really do not want to run vnd
> related stuff from netbsd 7 release except with everything from its
> own version - upgrade to what is now on the relevant branch, or what
> is in current, but do both vnd.c and vndconfig at the same time.

We are running a vnconfig from netbsd-7. netbsd-7 vnconfig was broken to
fix a problem with netbsd-7 kernel+netbsd-6 userland. This is inacceptable.
On netbsd-7, vnconfig -l was working fine before the kernel change.
(and now HEAD doens't even list free devices).

In addition it seems that in some case, vnconfig fails to configure
a free device.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index