Date: Wed, 17 Aug 2016 11:00:20 -0700 From: Nathan Whitehorn <nwhitehorn@freebsd.org> To: Andriy Gapon <avg@FreeBSD.org>, Warner Losh <imp@bsdimp.com> Cc: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@des.no>, src-committers <src-committers@FreeBSD.org>, "svn-src-all@freebsd.org" <svn-src-all@FreeBSD.org>, "svn-src-head@freebsd.org" <svn-src-head@FreeBSD.org> Subject: Re: svn commit: r304142 - head/usr.sbin/bsdinstall/partedit Message-ID: <f12ab9d1-7c2f-2a99-49dd-3c70ad6df17f@freebsd.org> In-Reply-To: <a4329a5d-24e5-cef8-f951-68cd088d6c8b@FreeBSD.org> References: <201608150930.u7F9UL1V069576@repo.freebsd.org> <e3454e8e-5d98-5bec-21de-8ea0db2b9b08@freebsd.org> <861t1n6749.fsf@desk.des.no> <581c856c-826b-529e-c9c6-a397fb679708@freebsd.org> <86wpjf4eun.fsf@desk.des.no> <8cb3fa1a-50cb-e238-d006-b98a628d446d@freebsd.org> <CANCZdfrUz-Hv3bTaYfx4k5q8usogzaDLRUPZktT75X5LYJapmw@mail.gmail.com> <445700cb-c4b4-9272-df17-a851a6200543@freebsd.org> <a4329a5d-24e5-cef8-f951-68cd088d6c8b@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 08/17/16 10:56, Andriy Gapon wrote: > On 17/08/2016 19:36, Nathan Whitehorn wrote: >> OK, so then what is the solution here? We have a number of tools that need to >> know this information: gpart, sade, bsdinstall, zfs, graid, etc. If we want to >> have a consistent set of defaults -- for example, to use 4K across the board, >> which I think is a good idea -- there should be a central place to set this that >> does not involve hacking a variety of independent tools. Do you disagree? >> >> I don't care how that happens. It happens that the way we currently encode this >> is geom stripesize. If we feel like we can't get this right in drivers, then we >> should provide a tunable to set a minimum default alignment. You could implement >> this in lots of different ways. But having static values hardcoded in random >> places that makes similar tools (sade, gpart) behave inconsistently cannot >> possibly be the answer. >> >> This is my point, from beginning to end. Is there any reason -- at all -- that >> we should prefer per-tool one-off changes to fixing the central mechanism we >> already have to give consistent results that we think are reliable? > It would be perfect to get a correct description of a disk and to do that in > central place. But still I, as a user / administrator, want to be able to > _force_ the alignment that I want when I partition a disk, create a filesystem, > etc. That is, even if the kernel reports the perfectly correct information and > the tools know how to automatically do what's best for me, I still want to eb > able to override. And I think that installers and administrative tools should > provide a way to do that. And many already do, e.g. 'gpart add -a X'. > So, I do not see how striving for the better disk detection (in a central place) > and having more knobs in the administration tools are mutually exclusive or > conflicting goals. > > Just my two bits. Agreed 100%. The issue here is that this kind of patch unconditionally overrides the kernel in an unsettable way. I think the right scheme is: 1. Try to get the real values as much as possible. 2. Provide a global hint to all tools that you want some value (e.g. 4K) unless the drivers are *sure* it's the wrong answer. 3. Have options in individual tools to force other values. We have (1), though it can probably be improved, and (3) and just need (2). -Nathan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f12ab9d1-7c2f-2a99-49dd-3c70ad6df17f>