Date: Mon, 29 Mar 1999 10:33:42 +0930 From: Greg Lehey <grog@lemis.com> To: Matt of the Long Red Hair <mattp@conundrum.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: newfs of ccd0 crashes Message-ID: <19990329103342.M413@lemis.com> In-Reply-To: <Pine.BSF.4.10.9903272039460.5267-100000@aeon.conundrum.com>; from Matt of the Long Red Hair on Sat, Mar 27, 1999 at 08:42:44PM -0500 References: <19990328103355.O53452@lemis.com> <Pine.BSF.4.10.9903272039460.5267-100000@aeon.conundrum.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday, 27 March 1999 at 20:42:44 -0500, Matt of the Long Red Hair wrote:
> On Sun, 28 Mar 1999, Greg Lehey wrote:
>
>> On Friday, 26 March 1999 at 13:58:27 -0500, Matt of the Long Red Hair wrote:
>>>
>>> I've trying to get ccd set up on my home box with a pair of large drives, but
>>> every time I try to newfs the ccd the machine crashes. I've gone through my
>>
>> Well, there's a lot more I'd like to see:
>>
>> 1. Which version of FreeBSD are you running?
>
> 3.1-stable (February 28th). Can't believe I forgot to include this in the
> first place... :)
OK. That should be revision 1.37. They brought in a fix for a
certain overflow problem on 11 March. It fixes a bug that happens on
ccds over 2 GB in size. You can try the following patch to
/usr/src/sys/dev/ccd/ccd.c and see if it works:
retrieving revision 1.37
retrieving revision 1.37.2.2
diff -w -u -r1.37 -r1.37.2.2
--- ccd.c 1998/09/15 08:15:26 1.37
+++ ccd.c 1999/03/11 19:21:31 1.37.2.2
@@ -1,4 +1,4 @@
-/* $Id: ccd.c,v 1.37 1998/09/15 08:15:26 gibbs Exp $ */
+/* $Id: ccd.c,v 1.37.2.2 1999/03/11 19:21:31 dg Exp $ */
/* $NetBSD: ccd.c,v 1.22 1995/12/08 19:13:26 thorpej Exp $ */
@@ -824,6 +825,7 @@
register struct ccdcinfo *ci, *ci2 = NULL; /* XXX */
register struct ccdbuf *cbp;
register daddr_t cbn, cboff;
+ register off_t cbc;
#ifdef DEBUG
if (ccddebug & CCDB_IO)
@@ -902,11 +904,10 @@
LIST_INIT(&cbp->cb_buf.b_dep);
cbp->cb_buf.b_resid = 0;
if (cs->sc_ileave == 0)
- cbp->cb_buf.b_bcount = dbtob(ci->ci_size - cbn);
+ cbc = dbtob((off_t)(ci->ci_size - cbn));
else
- cbp->cb_buf.b_bcount = dbtob(cs->sc_ileave - cboff);
- if (cbp->cb_buf.b_bcount > bcount)
- cbp->cb_buf.b_bcount = bcount;
+ cbc = dbtob((off_t)(cs->sc_ileave - cboff));
+ cbp->cb_buf.b_bcount = (cbc < bcount) ? cbc : bcount;
cbp->cb_buf.b_bufsize = cbp->cb_buf.b_bcount;
>> 2. What do you mean by "crash"? Is it a panic, a spontaneous reboot
>> or a hang?
>
> It's a hang. The machine locks up so that I have to hard-reset it.
Bad news. If the patch doesn't work, see if you can create a smaller
(< 2GB) ccd and newfs that.
Of course, the alternative is Vinum, which is much more powerful. See
http://www.lemis.com/vinum.html for more details.
Greg
--
When replying to this message, please copy the original recipients.
For more information, see http://www.lemis.com/questions.html
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-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990329103342.M413>
