Page MenuHomeFreeBSD

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

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



Make all of the gnop create/configure parameters optional in the kernel,
so that older 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 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

rS FreeBSD src repository - subversion
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

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
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.

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 added inline comments.
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