]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Support device-independent labels for geom_flashmap slices.
authorian <ian@FreeBSD.org>
Sun, 24 Mar 2019 19:11:45 +0000 (19:11 +0000)
committerian <ian@FreeBSD.org>
Sun, 24 Mar 2019 19:11:45 +0000 (19:11 +0000)
commit2b092124bfa73a422773f865b0e6c73f5c1d7fd8
treecff635a88b9e515ca1c2e88758b7e9b2dfbff6e1
parent136e1d1535180fb3a1ed1667f69eae7fbcd7c7c1
Support device-independent labels for geom_flashmap slices.

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.

Differential Revision: https://reviews.freebsd.org/D19535
sys/conf/files
sys/geom/geom_flashmap.c
sys/geom/geom_flashmap.h [new file with mode: 0644]
sys/geom/label/g_label.c
sys/geom/label/g_label.h
sys/geom/label/g_label_flashmap.c [new file with mode: 0644]