Page MenuHomeFreeBSD

Add support to geom_nop.ko kernel module for older geom_nop.so userland modules.
ClosedPublic

Authored by chs on Oct 10 2019, 6:33 PM.

Details

Summary

Make all of the gnop create/configure parameters optional in the kernel,
so that older geom_nop.so userland modules that don't pass some parameters
to the kernel in their request will still work.

Test Plan

I built a version of the geom_nop.so userland module that didn't have any of
the now-optional parameters and verified that the create/configure operations
still work (using default values).

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

chs created this revision.Oct 10 2019, 6:33 PM
imp accepted this revision.Oct 10 2019, 6:57 PM

This seems sane to me...
I'd e tempted to split this into two commits. One for geom_ctl and one for g_nop.

This revision is now accepted and ready to land.Oct 10 2019, 6:57 PM
cem requested changes to this revision.Oct 10 2019, 7:39 PM
This revision now requires changes to proceed.Oct 10 2019, 7:39 PM
cem added inline comments.Oct 10 2019, 7:42 PM
sys/geom/geom_ctl.c
388 ↗(On Diff #63129)

I think my previous line comment got lost. This null check isn’t precise enough, because it can also occur when the length check has already failed. In this case the error function is invoked a spurious second time.

chs added inline comments.Oct 10 2019, 9:52 PM
sys/geom/geom_ctl.c
388 ↗(On Diff #63129)

gctl_error() only does anything the first time it is called for a given request, so if it is called here a second time then that won't have any effect. But I can change this to avoid the second call if you'd prefer.

cem accepted this revision.Oct 10 2019, 10:28 PM
cem added inline comments.
sys/geom/geom_ctl.c
388 ↗(On Diff #63129)

Oh, ok. I wasn't familiar with the API; it's fine with me to leave it as is. Thanks.

This revision is now accepted and ready to land.Oct 10 2019, 10:28 PM