On Tue, Apr 26, 2011 at 09:17:04PM -0600, Warner Losh wrote: > > It's not difficult to add -- the issue is that the mechanism is unreliable. > > It doesn't work for all partition types supporting labels, it's hard to > > figure out what the name of the label provider is in a generic way, and the > > label providers have a nasty habit of disappearing periodically when you > > use the underlying provider for anything. Also, retastes don't always work. > > For example, if I change the label of a GPT partition, the label provider > > does not reflect the change until a disk reattach (e.g. a reboot). > > I know that for ufs, it works well, except for the root partition which > requires some dancing to retrofit. But if you relabel a partition, it shows > up right away in /dev/ufs/newlbl. Guess not all of them are that reliable. > > The new names, and slightly non-deterministic probe order make it more > important that we shake out the bugs from this as best we can. I think that > names/uuid are critical to the future, and we need to fix any remaining > issues.
Labels are kinda tricky and they differ. For example UFS labels or IDs don't play with tasting well (they were never designed to play well with such mechanism). You can create file system that is smaller than underlying provider (newfs -s). How do we know that label is assigned to the provider we are tasing and not to some other provider? Currently we check that based on recorded file system size and provider size, so we won't create label/id on ad0s1 instead of ad0s1a, but because of this we won't create label/id at all if file system was created with the -s option. GPT labels and IDs should be implemented as part of GPART class and not GLABEL. Currently if you modify GPT label for a partition in ad0 there is no write to, eg. ad0p1, so there is no taste event which allows glabel to detect the change, so the label is not updated in /dev/gpt/. There is a patch on freebsd-geom@ to move GPT labels/IDs to GPART. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com
pgpQLzfDpXeHf.pgp
Description: PGP signature