Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Apr 98 19:10:56 EDT
From:      luoqi@watermarkgroup.com (Luoqi Chen)
To:        abial@nask.pl, julian@whistle.com
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: Ouch... (DEVFS)
Message-ID:  <9804232310.AA10726@watermarkgroup.com>

next in thread | raw e-mail | index | archive | help
> Hi!
> 
> Hmmm... Here's another strange behaviour.
> 
> One more word about the previous errors, though (sources from 04.21.98):
> the kernel was dying with something like:
> 
> wd0: wdstart: weird dk_state 0
> panic: wdcontrol
>
> even without mounting MSDOSFS at all - it booted multiuser, and then after
> a few seconds died.
> 
> Now, there's something different.
> 
> I'm running version with patches from Luoqi Chen (after their integration
> into the tree). I can no longer even boot, because DEVFS code (or
> rather SLICE code) after probing fd0:'s MBR comes to:
> 
> wd0: probing for MBR..
Looks like the probing code stumbled upon a bad block and bad144 code 
was activated. Unfortunately, I didn't expect this to happen at this
early stage, the code tried to call upper layer for bad sector translation
while this is no upper layer yet. You may try the patch attached at the
bottom. But I doubt it will help you much, you may have a bad MBR block.

> and sits here idle for infinity. DDB doesn't show anything I could
> interpret with my (lack of) knowledge - 'tr' shows only break to debugger.
> 
> Previous version had no problem with my MBR or disklabel - it was finding
> them ok, only then was dying after a while...
> 
> Andrzej Bialecki
> 
> --------------------+---------------------------------------------------------
> abial@nask.pl       | if(halt_per_mth > 0) { fetch("http://www.freebsd..org") }
> Research & Academic | "Be open-minded, but don't let your brains to fall out."
> Network in Poland   | All of the above (and more) is just my personal opinion.
> --------------------+---------------------------------------------------------

-lq

--------------------CUT HERE-----------------
--- wd.c.orig	Thu Apr 23 18:49:24 1998
+++ wd.c	Thu Apr 23 18:48:42 1998
@@ -965,7 +965,7 @@
 				     blknum - ds_offset) + ds_offset;
 	}
 #else
-	if (du->dk_flags & DKFL_SINGLE) {
+	if (du->dk_flags & DKFL_SINGLE && du->slice->handler_up) {
 		(void) (*du->slice->handler_up->upconf)(du->slice,
 			SLCIOCTRANSBAD, (caddr_t)&blknum, 0, 0);
 	}
--- mbr.c.orig	Thu Apr 23 19:04:49 1998
+++ mbr.c	Thu Apr 23 19:04:53 1998
@@ -837,6 +837,8 @@
 		daddr_t blkno;
 		int part;
 
+		if (!slice->handler_up)
+			return 0;
 		blkno = *(daddr_t *)addr;
 		pd = slice->private_up;
 		sdp = pd->subdevs;

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9804232310.AA10726>