Date: Wed, 13 May 1998 11:19:32 -0700 (PDT) From: Julian Elischer <julian@whistle.com> To: Bruce Evans <bde@zeta.org.au> 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 Message-ID: <Pine.BSF.3.95.980513111314.10467C-100000@current1.whistle.com> In-Reply-To: <199805131325.XAA06754@godzilla.zeta.org.au>
next in thread | previous in thread | raw e-mail | index | archive | help
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 >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.980513111314.10467C-100000>