From owner-freebsd-alpha Thu Mar 29 11:59:38 2001 Delivered-To: freebsd-alpha@freebsd.org Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by hub.freebsd.org (Postfix) with ESMTP id 486D637B71F; Thu, 29 Mar 2001 11:59:34 -0800 (PST) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id OAA05581; Thu, 29 Mar 2001 14:59:33 -0500 (EST) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.3/8.9.1) id f2TJx3r81733; Thu, 29 Mar 2001 14:59:03 -0500 (EST) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15043.37894.906784.213672@grasshopper.cs.duke.edu> Date: Thu, 29 Mar 2001 14:59:02 -0500 (EST) To: obrien@FreeBSD.ORG Cc: freebsd-alpha@FreeBSD.ORG Subject: Re: Is `ccd' broken on Alpha? In-Reply-To: <20010328203437.A91793@dragon.nuxi.com> References: <20010328000954.C18676@dragon.nuxi.com> <15042.28453.158495.901316@grasshopper.cs.duke.edu> <20010328151704.A89023@dragon.nuxi.com> <15042.37922.136513.58056@grasshopper.cs.duke.edu> <15042.39091.263461.18565@grasshopper.cs.duke.edu> <20010328203437.A91793@dragon.nuxi.com> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org David O'Brien writes: > On Wed, Mar 28, 2001 at 09:06:43PM -0500, Andrew Gallatin wrote: > > It works again on da1e/da2e for me. I'm running the top of the tree; > > world built this afternoon. > > That actually isn't the issue. :-) > Can you repeat this, but use ccd0e rather than ccd0c? Do'h. Ok, I see the problem. bounds_check_with_label() is basically commented out and always returns -1 on alpha (without marking an error in the buf). I think ccd is the only caller of bounds_check_with_label() (vinum has its own version). Uncommenting it seems to fix the problem. Try the appended patch... I'm not really sure I understand why it was commented out in the first place; but I don't know a lot about disklabel handling. Assuming you have a label that looks like this on a pc: 8 partitions: # size offset fstype [fsize bsize bps/cpg] c: 2620928 0 unused 0 0 # (Cyl. 0 - 1279*) e: 2620928 0 4.2BSD 1024 8192 22 # (Cyl. 0 - 1279*) What happens if you do dd if=/dev/zero of=/dev/ccd0e count=1 ? On the alpha, it blows away the label and leaves me with this: 3 partitions: # size offset fstype [fsize bsize bps/cpg] c: 2620928 0 4.2BSD 0 0 0 # (Cyl. 0 - 1279*) Warning, partition c is not marked as unused! Warning, An incorrect partition c may cause problems for standard system utilities Cheers, Drew Index: alpha/alpha/machdep.c =================================================================== RCS file: /home/ncvs/src/sys/alpha/alpha/machdep.c,v retrieving revision 1.119 diff -u -r1.119 machdep.c --- alpha/alpha/machdep.c 2001/03/28 09:03:19 1.119 +++ alpha/alpha/machdep.c 2001/03/29 19:38:25 @@ -2020,7 +2020,6 @@ int bounds_check_with_label(struct bio *bp, struct disklabel *lp, int wlabel) { -#if 0 struct partition *p = lp->d_partitions + dkpart(bp->bio_dev); int labelsect = lp->d_partitions[0].p_offset; int maxsz = p->p_size, @@ -2067,7 +2066,7 @@ bad: bp->bio_flags |= BIO_ERROR; -#endif + return(-1); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message