tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: In-kernel units for block numbers, etc ...



On Sun, Nov 29, 2015 at 03:33:31AM +0700, Robert Elz wrote:
> 
> I wondered about that, but wasn't sure if the disklabel read might be
> needed for the dkwedge_discover() that immediately follows.

The wedge autodiscover code doesn't need the disklabel, it gets
some geometry data from the driver itself.

> That I can't easily test (and I doubt almost anyone else can either) as
> until we get cgd crypto validation that's based upon finding a valid GPT
> (rather than, or instead of, a disklabel, or valid ffs) GPT labelled cgds
> are not very useful, so I have never tried one.

You can also generate wedges from disklabels (which has some issues,
but I use it on all my systems) and this works fine with cgd.


> ps: incidentally, I even though (dev_t)0 is wd0a, I doubt that the major()
> part of it ever gets used, just minor(dev), which is why the PR observed
> reading from cgd0 when cgd1 was configured.

The major would only be used to identify the driver, but the disklabel
code is very lowlevel and gets the strategy routine passed and therefore
ignores the major number... except when scanning for ISO filesystems on
CDs where it tries to send an ioctl to the driver identified by the
major number.




Greetings,
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index