From owner-freebsd-current Wed Aug 18 21:20:49 1999 Delivered-To: freebsd-current@freebsd.org Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (Postfix) with ESMTP id D04D614DBD for ; Wed, 18 Aug 1999 21:20:29 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id NAA21240; Thu, 19 Aug 1999 13:50:23 +0930 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.3/8.9.0) id NAA27857; Thu, 19 Aug 1999 13:50:21 +0930 (CST) Date: Thu, 19 Aug 1999 13:50:21 +0930 From: Greg Lehey To: "Mark J. Taylor" Cc: Sheldon Hearn , Poul-Henning Kamp , current@FreeBSD.ORG Subject: Re: ccd bugs (was: Kernel hacker tasks seek interested hackers) Message-ID: <19990819135020.R14964@freebie.lemis.com> References: <1717.934983012@axl.noc.iafrica.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: ; from Mark J. Taylor on Wed, Aug 18, 1999 at 09:50:54AM -0400 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wednesday, 18 August 1999 at 9:50:54 -0400, Mark J. Taylor wrote: > On Wed, 18 Aug 1999, Sheldon Hearn wrote: > >> >> >> On Wed, 18 Aug 1999 09:19:20 -0400, "Mark J. Taylor" wrote: >> >>> There is a long as a parameter to ccdbuffer that needs to be a u_long. >>> Otherwise, you'll get panics (can't remember where). >>> Basically, bcount needs to be a u_long in all cases. >> >> Que? Are you sure? That means you want to change struct buf, where >> b_bcount is declared as long, as well? > > We didn't go as far as modifying the structure definition, just the > few "bcount" variables in the ccd.c code. > The problem was that we were seeing bcount go "negative". That's a bug. I'd guess that your modification took the bite of the bug, but the bug remains. b_bcount is, of course, the number of bytes that the request should transfer. Both ccd and vinum play around with struct bufs, creating their own headers, and it's conceivable that under some circumstances ccd might end up with a negative count. But it's definitely a bug, and a serious one, if it happens. > I believe that > "newfs" of the ccd would panic the kernel, reliably. Even on "smaller" > ccds (1 Gbyte), I believe. > I'm talking about ccds configured as in: > ccdconfig -c ccd0 0 0 /dev/da0s1c > > I know, this is fairly worthless as it stands, but it is done so we can > later "upgrade" the ccd to a mirror. Right, but it's probably also a pointer to the bug. > RSN, we will be moving to vinum. Hi Greg! Hi, Mark! I suppose I should try the corresponding vinum config :-) > Linux, BTW, does s/w RAID5. But, it seems you can't operate in degraded > mode, and the RAID5 reconstruction happens at boot time. We've got a 130 > GB RAID5 volume under Linux that takes about 10 hours to "ckraid". I hope > that this box never panics! You want vinum on Linux? Greg -- See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message