Page MenuHomeFreeBSD

geom_label: Make glabel labels more trivial by separating the tasting routines out.
ClosedPublic

Authored by delphij on Jul 9 2020, 7:29 AM.

Details

Summary

While there, also simplify the creation of label paths a little bit
by requiring the / suffix for label directory prefixes (ld_dir renamed
to ld_dirprefix to indicate the change) and stop defining macros for
these when they are only used once.

Test Plan

test glabel behavior after change

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

delphij created this revision.

@cem -- Note that D24968 needs to be amended due to conflict (I have it locally with an amendment to D25168 to make geli detach -l work again with aliases), I've uploaded these to https://github.com/delphij/freebsd/commits/scratch/geom .

delphij retitled this revision from geom_label: Make glabel labels more trivial by separating the tasting rounttnes out. to geom_label: Make glabel labels more trivial by separating the tasting routines out..Jul 9 2020, 7:40 AM

@cem -- Note that D24968 needs to be amended due to conflict (I have it locally with an amendment to D25168 to make geli detach -l work again with aliases), I've uploaded these to https://github.com/delphij/freebsd/commits/scratch/geom .

No worries, thanks for keeping it in mind.

This change looks good to me, sorry about the delay.

sys/geom/label/g_label.c
418–421 ↗(On Diff #74224)

It might be nice to encode this in the g_labels[] table somehow instead.

This revision is now accepted and ready to land.Jul 23 2020, 12:18 PM

ACK. I think this can be accomplished with a more intrusive change so let's do it in a later refactor instead.