From owner-freebsd-fs Thu Apr 5 10:38: 8 2001 Delivered-To: freebsd-fs@freebsd.org Received: from neko.cts.com (neko.cts.com [209.68.192.150]) by hub.freebsd.org (Postfix) with ESMTP id 4088C37B43E for ; Thu, 5 Apr 2001 10:38:05 -0700 (PDT) (envelope-from ctsmhn@cts.com) Received: from CARTMAN (cartman.cts.com [205.163.23.192]) by neko.cts.com (8.9.3/8.9.3) with SMTP id KAA18784 for ; Thu, 5 Apr 2001 10:38:04 -0700 (PDT) From: "Matthew H. North" To: Subject: RE: Reproducible kernel panics in ffs_valloc: dup_alloc Date: Thu, 5 Apr 2001 10:42:06 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 In-Reply-To: Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Great - thanks. I'll give it a shot. | -----Original Message----- | From: owner-freebsd-fs@FreeBSD.ORG | [mailto:owner-freebsd-fs@FreeBSD.ORG]On Behalf Of Bruce Evans | Sent: Wednesday, April 04, 2001 11:25 PM | To: Terry Lambert | Cc: Matthew H. North; freebsd-fs@FreeBSD.ORG | Subject: Re: Reproducible kernel panics in ffs_valloc: dup_alloc | | | On Thu, 5 Apr 2001, Terry Lambert wrote: | | > > Thanks for the help. However, from my understanding of C, | that patch does | > > nothing (except add an extra instruction or two to the | kernel). It simply | > > adds an extra OR condition, that is always false, to an if statement. | > > | > > if CONDITION then | > > do something | > > | > > is exactly the same as | > > | > > if FALSE or CONDITION then | > > do something | > > | > > Perhaps I'm missing something. If so, please let me know. | > | > I think he meant "&&" instead of "||", which then dikes the code out. | | Yes. Oops. I actually use a 150 line version of the patch, with checks | that vfs_bio_clrbuf() actually cleared the buffer and code to recover | when it doesn't | | Corrected version of the quick fix: | | Index: vfs_bio.c | =================================================================== | RCS file: /home/ncvs/src/sys/kern/vfs_bio.c,v | retrieving revision 1.273 | diff -u -2 -r1.273 vfs_bio.c | --- vfs_bio.c 2001/02/28 04:13:07 1.273 | +++ vfs_bio.c 2001/04/05 06:24:29 | @@ -3088,5 +3088,5 @@ | int i, mask = 0; | caddr_t sa, ea; | - if ((bp->b_flags & (B_VMIO | B_MALLOC)) == B_VMIO) { | + if (0 && (bp->b_flags & (B_VMIO | B_MALLOC)) == B_VMIO) { | bp->b_flags &= ~B_INVAL; | bp->b_ioflags &= ~BIO_ERROR; | | Bruce | | | To Unsubscribe: send mail to majordomo@FreeBSD.org | with "unsubscribe freebsd-fs" in the body of the message | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message