DragonFly BSD
DragonFly bugs List (threaded) for 2004-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: vfs_rootmount() failed


From: Hiroki Sato <hrs@xxxxxxxxxx>
Date: Mon, 31 May 2004 03:23:15 +0900 (JST)

Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx> wrote
  in <200405301613.i4UGDLJP026684@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
Description: PGP signature



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