Subject: 32 bit dev_t: I need a namei guru.
To: None <tech-kern@NetBSD.ORG>
From: Todd Vierling <tv@NetBSD.ORG>
List: tech-kern
Date: 01/12/1998 19:56:18
I have a stumbling block I can't figure out in the transition from 16 to 32
but dev_t.  I can't 'mount -u /' running the new kernel.

I tracked it down.  sys_mount() doesn't care about the dev_t's, and it ends
up calling ffs_mount(), who in turn calls namei() and checks the
*vnode*pointer* of the boot-time root device to the *vnode*pointer* of the
special device as returned by namei.  Somehow, these pointers match when
using the old style 16 bit dev_t's.

Okay, if dev_t's match, checkalias() woukd catch that and replace the vnode
pointer with the "same" pointer so they would be equal.  But namei() doesn't
call checkalias(), or cares at all about the dev_t... or does it?  I'm
getting lost in a maze of twisty code....  (Point of fact: I did fix the
SPECHASH() macro so that it returns the same has value regardless of 16 or
32 bit dev_t.)

=====
===== Todd Vierling (Personal tv@pobox.com) =====
== "There's a myth that there is a scarcity of justice to go around, so
== that if we extend justice to 'those people,' it will somehow erode the
== quality of justice everyone else receives."  -- Maria Price