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
F81625280: D19535.id54913.diff
Fri, Apr 19, 4:28 AM
Unknown Object (File)
Jan 3 2024, 7:23 PM
Unknown Object (File)
Dec 20 2023, 2:13 AM
Unknown Object (File)
Nov 15 2023, 5:05 AM
Unknown Object (File)
Nov 12 2023, 6:23 PM
Unknown Object (File)
Aug 28 2023, 5:51 AM
Unknown Object (File)
Jul 14 2023, 1:06 AM
Unknown Object (File)
Jul 7 2023, 9:04 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.