GEOM tastes every new provider: the partition classes read the partition table, LABEL creates gpt/, ufs/ and other labels, MIRROR and RAID look for their metadata. For a disk handed whole to a virtual machine (bhyve -s N,virtio-blk,/dev/diskid/DISK-...), that is the guest's data: the host shows the guest's partitions and labels, and a guest installed with the default layout brings gpt/efiboot0, gpt/gptboot0 and gpt/swap0 of its own, which clash with the host's labels of the same names. Today tasting can only be turned off for the whole machine (kern.geom.notaste) or for a whole label kind (kern.geom.label.<kind>.enable); a zvol has volmode=dev, a disk has nothing.
kern.geom.disk.notaste, a loader tunable and sysctl, lists disk idents (GEOM::ident, usually the serial number, as diskinfo -s prints it), separated by spaces. geom_disk sets the new provider flag G_PF_NOTASTE on a listed disk's provider. Such a provider is offered only to DEV (its /dev node) and LABEL; LABEL tries only the disk_ident label on it and passes the flag on to the diskid/DISK-<ident> provider, so the disk stays reachable by a name that does not change when disks are renumbered. The check is in every place that tastes: a new provider, a new class, g_retaste() and after a resize.
Added to the list at runtime, the geoms that tasted the disk before are withered unless they are open; an open one is reported and goes at the retaste after its last close. A disk taken off the list is tasted again at its next retaste (the last close of a write open).
struct g_provider does not change.