Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Mar 1995 11:09:46 +0200 (MET DST)
From:      gvrooij@mmra1.ms.philips.nl (Guido van Rooij)
To:        bde@zeta.org.au (Bruce Evans)
Cc:        pst@shockwave.com, freebsd-bugs@freefall.cdrom.com, jkh@freefall.cdrom.com
Subject:   Re: kern/280: new slice manager totally confused about old slice disks
Message-ID:  <9503290909.AA27856@mmra1.ms.philips.nl>
In-Reply-To: <199503290843.SAA23221@godzilla.zeta.org.au> from "Bruce Evans" at Mar 29, 95 06:43:47 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> This is correct.
> 

That's a big improvement. Thanks!

> 
> I think sysinstall creates a valid disk label with size 
> #secpertrack * #heads * #cyl in both the d_secperunit and the 'd' partition
> size fields.  The problem occurs when the sd driver blows away the 'd'
> partition size field (replacing it with the total #sec) without touching
> the d_secperunit field.  The wd driver is more careful and verbose.  It

Might well explain what we see indeed. But the same holds for the c partition.

> replaces the 'd' partition size field by the d_secperunit field and warns
> if there is a change.  The size reported by the drive gets blown away by
> the d_secperunit field earlier (this is "fixed" in the sliced version of
> wd).
> 
> >of the drive for a partition took all sectors left, while not checking
> >the consistency of all drive params).
> >How is that handled by this new scheme?
> 
> The label is adjusted so that all partitions are within the slice and
> warnings are printed about all adjustments.
> 
> >> The gratuitous kernel printfs when accessing the label are a bit much,
> >> do they only happen when booting in verbose mode?
> >> 
> >> sd0s1: start 32, end = 511999, size 511968: OK
> >> sd0s4: start 512000, end = 3514367, size 3002368: OK
> >> sd0: rejecting partition in BSD label: it isn't entirely within the slice
> 
> >What exactly does this message mean? And, more important, what are its
> >consequences on operation?
> 
> The OK messages are mainly to help debug the errror messages.  (If any.
> This is for a device driver - it isn't reasonable to look ahead 10
> slices to decide if the OK messages should be printed.  The bootverbose
> flag doesn't apply because the messages are for open(), not for probe()/
> attach().  You might need these messages after screwing up the DOS
> partitioning.)
> 

Sounds fair enough.

> The other message (1 line of 3) occurs because FreeBSD partitions are
> now required to be within the FreeBSD slice that the label is on.  This
> helps stop FreeBSD from writing to foreign slices when labels are
> misconfigured.  Rejected partitions become empty so you can't damage
> them.
> 

But what abt the following scheme: 
I've got a disk, labeled by 2.0R whit only one slice, namely for freebsd
with the defect I mentioned earlier (i.e. that the sd driver replaces
the c and d partition sizes with larger values than possible according
to the other drive params.).
I dont have sources handy and might well mix up the order of evaluation
but if the slice code rejects the c and d partitions because of their
sizes, it will also at least reject the (physically) last partition...

-Guido



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9503290909.AA27856>