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: make it compatible with bcachefs #243075

Closed
wants to merge 1 commit into from

Conversation

RaitoBezarius
Copy link
Member

Description of changes

Due to the existence of kmem_cache_alloc in bcachefs codebase, you need to undefine the symbol to make it usable by the ZFS module.

I will test this on myself first, tested with pkgs.linuxPackages_testing_bcachefs.zfs.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot requested review from globin, jonringer and jcumming July 12, 2023 14:28
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 1-10 10.rebuild-linux: 101-500 labels Jul 12, 2023
#define kmem_cache_destroy(skc) spl_kmem_cache_destroy(skc)
+
+/* This is necessary to be compatible with bcachefs for example. */
+#undef kmem_cache_alloc
Copy link
Member

Choose a reason for hiding this comment

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

upstream?

Copy link
Member Author

Choose a reason for hiding this comment

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

I will upstream it yes

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

This is upstreamed in 2.1.13 and 2.2.x.

@RaitoBezarius
Copy link
Member Author

I can report that I have now ZFS and bcachefs on the same machine, it's bliss.

Due to the existence of `kmem_cache_alloc` in bcachefs codebase, you need to undefine the symbol
to make it usable by the ZFS module.
@RaitoBezarius
Copy link
Member Author

Closing, this is already upstream now I believe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 1-10 10.rebuild-linux: 101-500 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants