vfs_rootmount() failed
Hiroki Sato
hrs at allbsd.org
Sun May 30 11:27:18 PDT 2004
Matthew Dillon <dillon at xxxxxxxxxxxxxxxxxxxx> wrote
in <200405301613.i4UGDLJP026684 at xxxxxxxxxxxxxxxxxxxx>:
dillon> What we need to do is figure out why it doesn't see the device. I am
dillon> going to take a quick look at the ATA device code and try to reproduce
dillon> the problem by throwing in a second drive. In fact, I think I may know
dillon> what it is already (but I'm not quite sure yet)... I allow multiple
dillon> units of a cdev to be overloaded on the device switch now and the below
dillon> code does not take that into account.
Hmmm, the loop should respect the minor device number? As far as I can check,
makeudev(cd, 0) does not return a device whose minor number != 0.
The attached patch solves my problem and my box works again
successfully with it, but is it a right approach?
dillon> Did you get any warning messages from the kernel before it failed
dillon> to find the device?
No warning is displayed.
--
| Hiroki SATO
Index: vfs_conf.c
===================================================================
RCS file: /cvs/src/sys/kern/vfs_conf.c,v
retrieving revision 1.8
diff -d -u -I\$FreeBSD:.*\$ -I\$NetBSD:.*\$ -I\$OpenBSD:.*\$ -I\$Id:.*\$ -I\$hrs:.*\$ -r1.8 vfs_conf.c
--- vfs_conf.c 19 May 2004 22:52:58 -0000 1.8
+++ vfs_conf.c 30 May 2004 18:09:13 -0000
@@ -349,7 +349,7 @@
unit = *cp - '0';
*cp++ = '\0';
for (cd = 0; cd < NUMCDEVSW; cd++) {
- dev = udev2dev(makeudev(cd, 0), 0);
+ dev = udev2dev(makeudev(cd, dkmakeminor(unit, slice, part)), 0);
if (dev_is_good(dev) && dev_dname(dev) &&
strcmp(dev_dname(dev), name) == 0) {
goto gotit;
Attachment:
pgp00012.pgp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00012.pgp
Type: application/octet-stream
Size: 187 bytes
Desc: "Description: PGP signature"
URL: <http://lists.dragonflybsd.org/pipermail/bugs/attachments/20040530/68846da0/attachment-0022.obj>
More information about the Bugs
mailing list