Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zfs: tidy up Linux-specific code #3013

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

dswarbrick
Copy link
Contributor

Group all Linux-specific zfs collector code in the already-existing zfs_linux.go, and move arch-agnostic init() function out of arch-specific files.

Copy link
Member

@discordianfish discordianfish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SuperQ
Copy link
Member

SuperQ commented Jul 14, 2024

Looks like this needs a rebase

@dswarbrick
Copy link
Contributor Author

@SuperQ Rebased, PTAL.

Avoid Linux-specific code scattered in two places by moving it to the
already-existing zfs_linux.go.

Signed-off-by: Daniel Swarbrick <[email protected]>
Code does not modify zfsPoolStatesName slice, so make it an array.

Signed-off-by: Daniel Swarbrick <[email protected]>
Ensure identical factory function name across arch-specific files so
that the common init() function in zfs.go works.

Signed-off-by: Daniel Swarbrick <[email protected]>
Also add build-tags to ensure it is ignored on non-relevant archs.

Signed-off-by: Daniel Swarbrick <[email protected]>
Drop superfluous and overly pedantic typecasting for values that fit
within 32 bits or where type comparison is already hinted.

Signed-off-by: Daniel Swarbrick <[email protected]>
@dswarbrick
Copy link
Contributor Author

Rebased, again, due to incoming log/slog migration. PTAL, A.

@dswarbrick
Copy link
Contributor Author

CircleCI test failures appear to have been transient due to them having a bad day, but I not able to retry the job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants