Date: Wed, 13 May 1998 23:25:21 +1000 From: Bruce Evans <bde@zeta.org.au> To: bde@FreeBSD.ORG, bde@zeta.org.au, 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: <199805131325.XAA06754@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>I guess we could make SLICE code do that. But eventually we'd like to get >rid of dev_t all together, we have to find another way to figure out if >a disk partition is a swap partition. IMO, using disklabel is the correct >way (being a 'b' partition doesn't prevent user from creating a fs in it, >and being a non-'b' partition doesn't mean you can't use it as a swap). >It's just bad luck we couldn't retrieve disklabel during a dump. 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). 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 :-). >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) Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805131325.XAA06754>