Page MenuHomeFreeBSD

Support device-independent labels for geom_flashmap slices.
ClosedPublic

Authored by ian on Mar 10 2019, 11:15 PM.
Tags
None
Referenced Files
F118895211: D19535.id55411.diff
Tue, Jun 3, 1:45 AM
Unknown Object (File)
Sat, May 31, 8:51 AM
Unknown Object (File)
Thu, May 8, 5:29 PM
Unknown Object (File)
Apr 25 2025, 7:24 AM
Unknown Object (File)
Apr 23 2025, 12:35 PM
Unknown Object (File)
Apr 21 2025, 9:36 PM
Unknown Object (File)
Apr 20 2025, 4:15 AM
Unknown Object (File)
Apr 19 2025, 12:36 PM
Subscribers

Details

Summary

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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
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$

sys/geom/geom_flashmap.c
44 ↗(On Diff #54913)

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

sys/geom/geom_flashmap.h
27 ↗(On Diff #54913)

$FreeBSD$ not sure why the : is there

sys/geom/label/g_label_flashmap.c
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.