From owner-freebsd-current Sat Jul 22 8: 4:16 2000 Delivered-To: freebsd-current@freebsd.org Received: from pike.osd.bsdi.com (pike.osd.bsdi.com [204.216.28.222]) by hub.freebsd.org (Postfix) with ESMTP id 6E47B37B5C5 for ; Sat, 22 Jul 2000 08:04:14 -0700 (PDT) (envelope-from jhb@pike.osd.bsdi.com) Received: (from jhb@localhost) by pike.osd.bsdi.com (8.9.3/8.9.3) id IAA98549; Sat, 22 Jul 2000 08:03:44 -0700 (PDT) (envelope-from jhb) From: John Baldwin Message-Id: <200007221503.IAA98549@pike.osd.bsdi.com> Subject: Re: No /boot/loader In-Reply-To: from Bruce Evans at "Jul 22, 2000 09:38:21 pm" To: Bruce Evans Date: Sat, 22 Jul 2000 08:03:44 -0700 (PDT) Cc: imp@village.org, dwhite@resnet.uoregon.edu, freebsd-current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL68 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Bruce Evans wrote: > On Fri, 21 Jul 2000, John Baldwin wrote: > > > Bruce Evans wrote: > > > On Thu, 20 Jul 2000, John Baldwin wrote: > > > > ... > > > > unused even though it is, in fact, used. The fact that it works at all is > > > > due to brokenness on our part (we don't check that partitions in a disklabel > > > > fit in the parent slice) and also results in several hacks in various portions > > > > of the code where we have to check for such bogusness and work around it. > > > > > > No, that's wrong too :-) . We a lot of checking that partitions in a > > > disklabel fit in the parent slice. We clip partitions that don't fit in > > > various ways for backwards compatibility. > > > Erm, maybe we clip partitions which aren't dangerously dedicated, but > > I've created test dangerously dedicated disks, and we certainly do not > > bother to actually change any of the slice information when we do so. > > disklabel(8) does for truly dedicated, but libdisk doesn't for dangerously > > dedicated. > > The dangerously dedicated case has one slice covering the whole disk. We > unclip the slice info from the magic 50000 sectors to the size of the whole > disk (as reported by the driver) to handle this. Reading the slice info > using DIOCGSLICEINFO shows the full size, but no changes are made to the > mbr. This is in the kernel. I'm not sure exactly what libdisk does, but > it is constrained by what the kernel will accept. > > Bruce Ok, so we normally do clip slice information, except in the case of a dangerously dedicated slice. Which works fine so long as no one ever creates a 50000 block slice in the 4th entry, as we will expand that slice to cover all of the disk. It also means that kernel, like the loader, has to special case when it sees a dangeriously dedicated slice, which is rather evil, IMO. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message