Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 May 1998 11:10:20 -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.980513110309.10467B-100000@current1.whistle.com>
In-Reply-To: <199805131113.VAA31165@godzilla.zeta.org.au>

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> No, correct versions of d_psize() open and close the device if necessary
> (see dssize() or pre-slice versions of all the drivers that supported
> dumping (wd and sd).

I tend to agree that all operations that are going to use a device
should let lower layers know that this is about to happen.

> 
> >The previous commit is necessary to enable dump for a SLICE kernel. An
> 
> The SLICE kernel should follow the standard conventions and set
> dkpart(dev) = 1 for 'b' partitions.  This convention is also used by
> config (`dumps on wd0' gives dumpdev = device for non-SLICED wd0b,
> and cpu_dumpconf() calls setdumpdev(dumpdev).  What does the SLICE
> code do with raw dev numbers not created by it?

Minor numbers are arbitrarily assigned in the order they are encountered.
there is no 'meaning' to minor numbers.
however the 'disklabel' module can tell immediatly what 
partition it belongs to. (but not by masking the minor number against
chicken entrails)
Personally I think a dump should be performable against any partition that
doesn't object..
I think each 'layer should have it's own criteria.
e.g. as the request is passed to the disklabel layer it should check
the 'type' of the partition, and refuse to do it to a 4.2BSD partition.
similarly for the mbr layer, which might only allow it for
'LINUX-SWAP' type (or similar)


> 
> >alternative would be to get rid of the bogus swap partition check. One
> >has to be extremely careful not to point dump dev to a fs partition after
> >this safty check is gone.
> 
> I think things would be safe enough if the check is moved to user space.
> Make dumpon(1) enforce the 'b' partition and unless a new option is
> used to tell it that you really want the device that you specified.
> The kern.dumpdev sysctl is too hard to use directly, so there is probably
> no need to restrict it.

'b' is too arbitrary.
I want to swap on my Linux swap partition.
it's not 'b'

> 

julian



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.980513110309.10467B-100000>