Page MenuHomeFreeBSD

Support device-independent labels for geom_flashmap slices.

Authored by ian on Mar 10 2019, 11:15 PM.



While geom_flashmap has always supported label names for its slices, it does so by appending "s.labelname" to the provider device name, meaning you still have to know the name and unit of the hardware device to use the labels.

These changes add support for device-independent geom_flashmap labels, using the standard geom_label infrastructure. geom_flashmap now creates a softc struct attached to its geom, and as it creates slices it stores the label into an array in the softc. The new geom_label_flashmap uses those labels when tasting a geom_flashmap provider.

Diff Detail

rS FreeBSD src repository - subversion
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Add the required change to sys/conf/files, missed in the first diff.

I like it, just nits, that for the most part you can ignore, other than $FreeBSD: vs $FreeBSD$

44 ↗(On Diff #54913)

This should probably be sorted, or did I miss a dependancy that _slice or _disk need from _flashmap?

27 ↗(On Diff #54913)

$FreeBSD$ not sure why the : is there

49 ↗(On Diff #54913)

Sort variables by name?

This revision is now accepted and ready to land.Mar 11 2019, 5:16 PM
This revision was automatically updated to reflect the committed changes.