svn commit: r302985 - head/sys/geom/label

Maxim Sobolev sobomax at freebsd.org
Mon Jul 18 19:37:42 UTC 2016


Well, this looks to me exactly what I am talking about. With this change we
are only allowing underlying provider to be *slighly* bigger than the UFS
size. So as I said it's pretty harmless to do so, or at least I think it
is. In general I think this case is underlying some missing design feature
of GEOM framework, which basically gives provider to a first bidder that
likes the taste of it. What needs to be happening instead is to have some
rank in there, so if consumer A and consumer B both "like" the taste, but
provider A has bigger rank it would be given a preference. Then "whole
disk" partitioning schemes (mbr, gpt) could be given biggest rank, BSD
label and friends slightly smaller, encryption/compression yet smaller and
providers that just "decorate" things, like LABEL the lowest possible.

-Max

On Mon, Jul 18, 2016 at 12:13 PM, Andrey V. Elsukov <bu7cher at yandex.ru>
wrote:

> On 18.07.16 17:24, Maxim Sobolev wrote:
> > Andrey, are you talking about this:
> >
> > ---
> > r156299 | pjd | 2006-03-04 11:41:54 -0800 (сб, 04 мар 2006) | 11 lines
> >
> > We need to check if file system size is equal to provider's size, because
> > sysinstall(8) still bogusly puts first partition at offset 0 instead of
> 16,
> > so glabel/ufs will find file system on slice instead of partition.
> >
> > Before sysinstall is fixed, we must keep this code, which means that we
> > wont't be able to detect UFS file systems created with 'newfs -s ...'.
> >
> > PS. bsdlabel(8) creates partitions properly.
> >
> > MFC after:      3 days
> > ---
> >
> > In which case this particular change has a better chance of working
> > since it's not removing this check but making it less strict. Therefore
> > it might attach to a wrong provider only if first UFS slice is the only
> > one slice on partition (or if the other partition is very small - less
> > than 256 blocks in size). In either of those cases I don't think it
> > makes much difference if we are attaching to a slice or a partition.
>
> No, I mean r235918, that was reverted after several complains.
> UFS label is a special label. It always had the same size that provider.
> Now it will attach to first provider that will be tasted. It can be
> gmirror, generic glabel, geli, gpart, mbr, whole disk.
>
> https://lists.freebsd.org/pipermail/freebsd-geom/2009-April/003473.html
>
> --
> WBR, Andrey V. Elsukov
>
>


More information about the svn-src-all mailing list