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.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 28, 9:55 PM
Unknown Object (File)
Thu, Nov 28, 8:47 AM
Unknown Object (File)
Sun, Nov 24, 9:26 PM
Unknown Object (File)
Nov 22 2024, 4:53 AM
Unknown Object (File)
Nov 21 2024, 6:44 AM
Unknown Object (File)
Nov 14 2024, 7:17 PM
Unknown Object (File)
Nov 5 2024, 2:23 PM
Unknown Object (File)
Oct 26 2024, 4:26 AM
Subscribers
None

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 - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 26981
Build 25281: arc lint + arc unit

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
sys/geom/geom_ctl.c
388

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.

sys/geom/geom_ctl.c
388

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.
sys/geom/geom_ctl.c
388

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