HomeFreeBSD

Expose API to allow disks to ask for alias names in devfs.

Description

Expose API to allow disks to ask for alias names in devfs.

Implement disk_add_alias to allow aliases to be added to disks. All
disk have a primary name (say "foo") can also have secondary names
(say "bar") such that all instances of "foo" also have a "bar"
alias. So if you have foo0, foo0p1, foo1, foo1s1 and foo1s1a nodes
created by the foo driver and gpart, device nodes bar0, bar0p1, bar1,
bar1s1 and bar1s1a will appear as symlinks back to the original nodes.
This generalizes to multiple aliases. However, since the unit number
follows the primary name, multiple device drivers can't create the
same aliases unless those drives coorinate the unit number space (eg
you couldn't add an alias 'disk' to both 'da' and 'ada' because it's
possible to have da0 and ada0, because 'disk0' is ambiguous).

Differential Revision: https://reviews.freebsd.org/D11873

Details

Provenance
impAuthored on
Differential Revision
D11873: Create mechanism to allow nvd to be an alias for nda
Parents
rS322197: Add alias support to gpart.
Branches
Unknown
Tags
Unknown