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)
Sun, Apr 7, 1:53 AM
Unknown Object (File)
Dec 24 2023, 4:04 AM
Unknown Object (File)
Dec 20 2023, 7:54 AM
Unknown Object (File)
Nov 14 2023, 10:00 PM
Unknown Object (File)
Sep 13 2023, 5:07 PM
Unknown Object (File)
Sep 9 2023, 12:22 AM
Unknown Object (File)
Aug 4 2023, 8:44 AM
Unknown Object (File)
Aug 4 2023, 8:41 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 Not Applicable
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
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.

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