-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Merge SPL into ZFS [WIP] #6479
Merge SPL into ZFS [WIP] #6479
Conversation
Can/should we be importing the SPL history rather than simply importing the files at a point in time? |
@chrisrd It has been a while since I've done it, and there are a couple different approaches that can be taken, but it is certainly possible to retain SPL history in a combined git repository. |
Keeping the history would be nice. Particularly if we could somehow limit it only the specific files we want to merge. |
You should be able to just remove those files you don't want before merge. Also, we should probably use It's very simple in principle. Just add spl repo as a remote. Fetch it, and merge it into zfs master like a normal branch. Though there will likely be quite a lot of conflict in the common files like Makefiles and stuffs. |
Which files shouldn't be merged? (Apart from obvious things like empty FYI, you can start looking at the merge (with history) using, in your zfs repository:
I found this useful for looking through the conflicts:
To my mind, it should be relatively straight forward to merge the technical parts. As a licensing neophyte the trickier part of the merge is deciding what to do with the GPL vs CDDL licensing issue. E.g. files which appear in both repositories which look to have have come from upstream on the zfs side with, I guess, implied copyright, vs newly written, with explicit copyright header, on the spl side, e.g. |
I don't think we need to bring over the SPLAT sources. This test framework was extremely useful when initially implementing the various primitives, but now that we have good test coverage for ZFS in place it's much less useful. Except for specific cases ZFS itself does a much better job validating that code is working as intended.
It would be best to keep the SPL code and headers entirely separate in their own sub-directory. We'll need to double check that every file has the correct license at the top, and we're going to want to add a top-level LICENSE file clearly describing which parts of the source tree are covered by which license. This would also be a good time to reach out to anyone who's contributed to the SPL and determine if we can dual license everything from the SPL as CDDL / GPL. |
Pushed an update to allows packages to be built and include SPL. |
e587451
to
c4e4456
Compare
146a8ee
to
850dda8
Compare
55cd0b4
to
d592d0f
Compare
Add SPL files as of spl-0.7.0 release. No integration, Makefile adjustments, etc. so they are not built. Build-SPL: no Build-ZFS: yes Build-Lustre: no Signed-off-by: Olaf Faaland <[email protected]>
* spl autoconf checks * use zfs_config.h instead of spl_config.h * generate a Makefile for spl module * SPL include files for modules under include/spl * Mark SPL module as GPL (different than META_LICENSE) * fixup to unload_modules() in zfs-common.sh * Add spl.ko to list of ZFS modules * Remove splat * Include SPL in built packages * Add a script for fixing style issues, to be run against each file e.g. find ./include -name '*.h' | xargs -n1 scripts/fix-spl-style * Update dkms build script * Update zimport.sh to skip SPL build if no appropriate tag is present, so old and new versions of ZFS are built properly. * Replace SPL uses of DEFINE_* and DECLARE_* with non-constant arguments that do not build under std=gnu99. Build-SPL: no Build-ZFS: yes Build-Lustre: no Signed-off-by: Olaf Faaland <[email protected]>
d592d0f
to
93811f3
Compare
There is no dynamic initializer for the ratelimit type provided by the kernel, but the provided macro which both declares and initializes cannot build under std=gnu99 because the value used to initialize the lock field in the structure is not constant. The two cases where the type was used should be very infrequent anyway. Build-SPL: no Build-ZFS: yes Build-Lustre: no Signed-off-by: Olaf Faaland <[email protected]>
35c042d
to
150b586
Compare
@ofaaland Can you retire the |
Closing. I'll open a new PR for this in the next few weeks. |
Description
Merge the SPL into ZFS to eliminate the extra work required when SPL code must change due to kernel or distro changes, and to simplify the build process.
Work In Progress.
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist:
Signed-off-by
.