Date: Mon, 18 Jul 2016 12:37:40 -0700 From: Maxim Sobolev <sobomax@freebsd.org> To: "Andrey V. Elsukov" <bu7cher@yandex.ru> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r302985 - head/sys/geom/label Message-ID: <CAH7qZftq0V8bOXtYPMd_Lc0W8yBqg8AyuCzejcJAwrc%2BoBaofA@mail.gmail.com> In-Reply-To: <61cba001-2717-49ee-843e-5ed6d18fa17b@yandex.ru> References: <201607180500.u6I501CX063743@repo.freebsd.org> <20ae3dfe-96f4-c897-67d0-71bb94d14858@yandex.ru> <CAH7qZftQg4TDyGC_kMPVcHpinK_Q_JvKZ-uQXzim16SOFnw%2BPQ@mail.gmail.com> <61cba001-2717-49ee-843e-5ed6d18fa17b@yandex.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
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@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 (=D1=81=D0=B1, 04 =D0=BC=D0= =B0=D1=80 2006) | 11 lines > > > > We need to check if file system size is equal to provider's size, becau= se > > 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 > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAH7qZftq0V8bOXtYPMd_Lc0W8yBqg8AyuCzejcJAwrc%2BoBaofA>