Date: Thu, 29 Mar 2001 14:59:02 -0500 (EST) From: Andrew Gallatin <gallatin@cs.duke.edu> To: obrien@FreeBSD.ORG Cc: freebsd-alpha@FreeBSD.ORG Subject: Re: Is `ccd' broken on Alpha? Message-ID: <15043.37894.906784.213672@grasshopper.cs.duke.edu> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15043.37894.906784.213672>
