Page MenuHomeFreeBSD

Adjustments to includes for openzfs
ClosedPublic

Authored by imp on Sep 24 2020, 6:19 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Feb 27, 12:54 PM
Unknown Object (File)
Feb 22 2024, 10:06 AM
Unknown Object (File)
Feb 10 2024, 5:34 PM
Unknown Object (File)
Feb 7 2024, 4:07 PM
Unknown Object (File)
Dec 6 2023, 1:59 PM
Unknown Object (File)
Nov 24 2023, 1:34 AM
Unknown Object (File)
Nov 24 2023, 12:25 AM
Unknown Object (File)
Nov 23 2023, 3:00 PM
Subscribers

Details

Summary

Tweak systm.h to work in a standalone env

Most of the heavy lifting is done by limiting most of this file to only the kernel, since that's the only thing that actually uses those bits.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 33830
Build 31047: arc lint + arc unit

Event Timeline

imp requested review of this revision.Sep 24 2020, 6:19 AM
imp created this revision.
imp added a reviewer: jhb.

This revision successfully builds and reboots, so I think it's right But since it's systm.h and we do some funky monkey business in there, I'd like more eyes on it to be sure.

put nullability macro outside kernel ifdefs

It's safer to put __NULLABILITY_PRAGMA_PUSH/POP ouside the kernel
ifdefs since we drop and pick it up. future changes my oops.

sys/sys/systm.h
88

It's hard to imagine that you are using VNASSERT() outside of the kernel.

Which of these are you actually using? I still think new code should use _Static_assert() directly rather than CTASSERT, and KASSERT() is kind of crummy due to its lack of using VAR_ARGS, so I would rather stand.h grow a useful macro that works with VAR_ARGS instead rather than repeating that mistake if possible.

sys/sys/systm.h
88

This is for old code being brought into stand: There's bits of ZFS that are now being more aggressively pulled in. So there's no repeat of the past, just using things... I'll confirm they are actually used, though...

Rejigger

KASSERT, et al, now are a printf in the boot loader. We don't
have enough milage to turn it on just yet.

Respond to jhk's good feedback...

sys/sys/systm.h
214

Note: we should likely fix this... there's only two files (and not one per arch) that use it. osreldate is more wide spread

imp marked an inline comment as done.

Ah, this comment was correct, restore after the move.

tsoome added a subscriber: tsoome.

I think printf is ok to have.

This revision is now accepted and ready to land.Sep 25 2020, 8:00 PM

Thanks for double checking.

This revision was automatically updated to reflect the committed changes.