From owner-cvs-sys Wed May 13 11:29:10 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA16196 for cvs-sys-outgoing; Wed, 13 May 1998 11:29:10 -0700 (PDT) (envelope-from owner-cvs-sys) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA16139; Wed, 13 May 1998 11:28:53 -0700 (PDT) (envelope-from julian@whistle.com) Received: (from daemon@localhost) by alpo.whistle.com (8.8.5/8.8.5) id LAA27245; Wed, 13 May 1998 11:19:41 -0700 (PDT) Received: from current1.whistle.com(207.76.205.22) via SMTP by alpo.whistle.com, id smtpd027241; Wed May 13 18:19:35 1998 Date: Wed, 13 May 1998 11:19:32 -0700 (PDT) From: Julian Elischer To: Bruce Evans cc: bde@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, cvs-sys@FreeBSD.ORG, luoqi@watermarkgroup.com Subject: Re: cvs commit: src/sys/i386/i386 autoconf.c src/sys/kern kern_shutdown.c In-Reply-To: <199805131325.XAA06754@godzilla.zeta.org.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Wed, 13 May 1998, Bruce Evans wrote: > > I don't want to use a disk label. I use a DOS partition (shared with > Linux) for swap and dumps. I had to label it to get it to work under > FreeBSD (except under SLICEd kernel which don't recognise labels on Linux > swap partitions). That's not really an acceptable kludge for production.. the disklabel doesn't make sense in the contect of a linux partition. that's why it doesn't get looked for with SLICE. (It could be changed (one line change), but that would be rather unclean). Whether a disk subsection is swappable or dumpable needs to be independent of whether it is labled or not or whether it ends in the last letter 'b'. I would suggest that in 'SLICE, the d_size call simply return 0 or -1 for a subdevice that doesn't want to be swapped on. > > The label sector is essentially read-only in Linux - > the zero bits in it are interpeted as bad sectors, so I lose a little > swap space under Linux :-). that is a kludge I wouldn't have admitted to :-) > > >I have a suggestion: since swap and dump code are the only consumers of > >d_psize(), can we change d_psize to return disklabel instead (similar to > >what DIOCGPART does)? This would also allow us to get rid of the DIOCGPART > >kludge (ioctl should only be called from userland). If you think this is > >doable, I can work out a patch for that. > > No, raw disks don't have labels, and labels are too large. DIOCGPART > and d_maxio should be replaced by additional interfaces like d_psize() > instead. Eventually the interfaces should be something like: > > #define d_psize(diskdevp) ((diskdevp)->d_psize) what's a diskdevp? > > Bruce >