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

linux/spl/kmem_cache: undefine kmem_cache_alloc before defining it #15144

Merged
merged 1 commit into from
Aug 7, 2023

Conversation

RaitoBezarius
Copy link
Contributor

Motivation and Context

2.2 variant of #15143.

When compiling a kernel with bcachefs and zfs, the two macros will collide, making it impossible to have both filesystems.

It is sufficient to just undefine the macro before calling it.

On why this should be in ZFS rather than bcachefs, currently, bcachefs is not a in-tree filesystem, but, it has a reasonably high chance of getting included soon.

This avoids the breakage in ZFS early, this patch may be distributed downstream in NixOS and is already used there.### Description

How Has This Been Tested?

I am not running 2.2 series yet.

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:

@RaitoBezarius RaitoBezarius force-pushed the bcachefs-compat-2_2 branch 2 times, most recently from 43fb9be to 684a77a Compare August 2, 2023 17:20
@RaitoBezarius RaitoBezarius marked this pull request as ready for review August 2, 2023 17:21
@behlendorf behlendorf added the Status: Accepted Ready to integrate (reviewed, tested) label Aug 2, 2023
Copy link
Contributor

@bwatkinson bwatkinson left a comment

Choose a reason for hiding this comment

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

This looks good to me, but you need to update your commit message with the sign off to fit into the coding style. Just do a git commit --amend --signoff and push back to this PR.

@RaitoBezarius
Copy link
Contributor Author

This looks good to me, but you need to update your commit message with the sign off to fit into the coding style. Just do a git commit --amend --signoff and push back to this PR.

Oh yes sorry.

When compiling a kernel with bcachefs and zfs,
the two macros will collide, making it impossible
to have both filesystems.

It is sufficient to just undefine the macro before calling it.

On why this should be in ZFS rather than bcachefs, currently,
bcachefs is not a in-tree filesystem, but,
it has a reasonably high chance of getting included soon.

This avoids the breakage in ZFS early,
this patch may be distributed downstream in NixOS
and is already used there.

Signed-off-by: Ryan Lahfa <[email protected]>
@behlendorf behlendorf merged commit fdb8fff into openzfs:master Aug 7, 2023
19 checks passed
behlendorf pushed a commit to behlendorf/zfs that referenced this pull request Aug 25, 2023
When compiling a kernel with bcachefs and zfs,
the two macros will collide, making it impossible
to have both filesystems.

It is sufficient to just undefine the macro before calling it.

On why this should be in ZFS rather than bcachefs, currently,
bcachefs is not a in-tree filesystem, but,
it has a reasonably high chance of getting included soon.

This avoids the breakage in ZFS early,
this patch may be distributed downstream in NixOS
and is already used there.

Reviewed-by: Brian Atkinson <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ryan Lahfa <[email protected]>
Closes openzfs#15144
behlendorf pushed a commit that referenced this pull request Aug 25, 2023
When compiling a kernel with bcachefs and zfs,
the two macros will collide, making it impossible
to have both filesystems.

It is sufficient to just undefine the macro before calling it.

On why this should be in ZFS rather than bcachefs, currently,
bcachefs is not a in-tree filesystem, but,
it has a reasonably high chance of getting included soon.

This avoids the breakage in ZFS early,
this patch may be distributed downstream in NixOS
and is already used there.

Reviewed-by: Brian Atkinson <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ryan Lahfa <[email protected]>
Closes #15144
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request Dec 12, 2023
When compiling a kernel with bcachefs and zfs,
the two macros will collide, making it impossible
to have both filesystems.

It is sufficient to just undefine the macro before calling it.

On why this should be in ZFS rather than bcachefs, currently,
bcachefs is not a in-tree filesystem, but,
it has a reasonably high chance of getting included soon.

This avoids the breakage in ZFS early,
this patch may be distributed downstream in NixOS
and is already used there.

Reviewed-by: Brian Atkinson <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ryan Lahfa <[email protected]>
Closes openzfs#15144
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