Subject: Re: kern/32112
To: None <,,>
From: Jed Davis <>
List: netbsd-bugs
Date: 08/24/2006 02:50:04
The following reply was made to PR kern/32112; it has been noted by GNATS.

From: Jed Davis <>
Subject: Re: kern/32112
Date: Wed, 23 Aug 2006 22:49:43 -0400

 Now that I finally understand what checkalias() is and isn't meant to do...
 The problem here is that, for a device that's been bdevvp()ed when no
 real filesystem vnodes of it exist (e.g., the root device), checkalias()
 will splat over it with the first instance of that device encountered in
 the filesystem, causing whichever mount that device node came from to
 inherit any existing opens on the fake vnode.
 Normally this isn't a problem, because that node will be in /dev on the
 root FS itself.  But, if the first thing done after boot is a restore
 that creates device nodes, or the population of an MFS /dev, or making
 use of the new "init.root" feature (and then looking up the original
 root device in the chrooted system), then that FS will be stuck with the
 So, a workaround: "ls /dev > /dev/null".
 As for the "does not match mounted device", that's because (in the
 example above) /altroot/dev/sd0a is now the "mounted device", and
 ffs_mount won't update if the vnode is different.  I feel that this
 latter is also incorrect (consider the case of init.root -- the chrooted
 system can't update its own root fs), and that it should allow the
 update if the device numbers match.