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

FreeBSD: exclude some includes when building libsa #16616

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

mmatuska
Copy link
Contributor

@mmatuska mmatuska commented Oct 7, 2024

Motivation and Context

The function abd_alloc_from_pages() is not used in FreeBSD base libsa.
Excluding sys/vm.h, and vm/vm_page.h includes avoids dependency problems.

Description

Exclude abd_alloc_from_pages(), sys/vm.h, and vm/vm_page.h when building libsa.

How Has This Been Tested?

FreeBSD base build

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

Copy link
Member

@amotin amotin left a comment

Choose a reason for hiding this comment

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

I wonder if #ifdef _KERNEL would be more appropriate. That is how I see the function calls are wrapped.

@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Oct 7, 2024
@behlendorf
Copy link
Contributor

Using #ifdef _KERNEL would be more consistent with how this is handled elsewhere in ZFS. @mmatuska unless there are good reasons not to switch this could you please update the PR.

@mmatuska
Copy link
Contributor Author

mmatuska commented Oct 8, 2024

Using #ifdef _KERNEL would be more consistent with how this is handled elsewhere in ZFS. @mmatuska unless there are good reasons not to switch this could you please update the PR.

Thank you for the hint, PR updated.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Oct 8, 2024
The function abd_alloc_from_pages() is used only in kernel.
Excluding sys/vm.h, and vm/vm_page.h includes avoids dependency
problems.

Signed-off-by: Martin Matuska <mm@FreeBSD.org>
@behlendorf behlendorf merged commit efeb60b into openzfs:master Oct 9, 2024
18 of 20 checks passed
behlendorf pushed a commit to behlendorf/zfs that referenced this pull request Oct 9, 2024
The function abd_alloc_from_pages() is used only in kernel.
Excluding sys/vm.h, and vm/vm_page.h includes avoids dependency
problems.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Martin Matuska <mm@FreeBSD.org>
Closes openzfs#16616
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants