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
[WIP] Linux 4.19-rc3+ compat: Remove refcount compat changes #7932
Conversation
|
@philmmanjaro |
torvalds/linux@59b57717f ("blkcg: delay blkg destruction until after writeback has finished") added a refcount_t to the blkcg structure. Due to the refcount_t compatibility code, zfs_refcount_t was used by mistake. Resolve this by removing the compatibility code and replacing the occurrences of refcount_t with zfs_refcount_t. Signed-off-by: Tim Schumacher <timschumi@gmx.de>
|
Assuming this is merged to ZoL, let's get it in illumos as well, otherwise this will cause lots of merge conflicts. |
|
I've created a similar patch I currently use for v0.7.10 release. It compiles, however I didn't had time to test it yet, as I don't use zfs at all on my system. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had hoped to avoid this, as I sure you can tell by the preprocessor slight of hand, but it doesn't seem like that's going to be possible any longer. We should consider prefixing all of the refcount functions with zfs_ to prevent any future collisions and pushing that to OpenZFS.
Additionally, updating these zfs_refcount_* functions so they're layered on their optimized kernel counterparts wouldn't be a bad idea. I'm OK with doing this in multiple parts to first resolve the immediate build issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working fine on top of 0.8.0-rc1 with Linux 3.19-rc4.
|
@behlendorf If we indeed go with this patch, should I fix the styling issue in the commit message or is that not worth pushing a new revision? |
|
@timschumi let's go with this minimal patch as is to solve the immediate problem. If you can follow up with a PR to add the |
|
Any chance of the 4.19 patch being ported back to the 0.7.x series for 0.7.12? |
|
@satmandu I added it to the 0.7.12 patchlist (https://github.com/zfsonlinux/zfs/projects/20) |
torvalds/linux@59b57717f ("blkcg: delay blkg destruction until after writeback has finished") added a refcount_t to the blkcg structure. Due to the refcount_t compatibility code, zfs_refcount_t was used by mistake. Resolve this by removing the compatibility code and replacing the occurrences of refcount_t with zfs_refcount_t. Reviewed-by: Franz Pletz <fpletz@fnordicwalking.de> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tim Schumacher <timschumi@gmx.de> Closes openzfs#7885 Closes openzfs#7932
torvalds/linux@59b57717f ("blkcg: delay blkg destruction until after writeback has finished") added a refcount_t to the blkcg structure. Due to the refcount_t compatibility code, zfs_refcount_t was used by mistake. Resolve this by removing the compatibility code and replacing the occurrences of refcount_t with zfs_refcount_t. Reviewed-by: Franz Pletz <fpletz@fnordicwalking.de> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tim Schumacher <timschumi@gmx.de> Closes openzfs#7885 Closes openzfs#7932
torvalds/linux@59b57717f ("blkcg: delay blkg destruction until after writeback has finished") added a refcount_t to the blkcg structure. Due to the refcount_t compatibility code, zfs_refcount_t was used by mistake. Resolve this by removing the compatibility code and replacing the occurrences of refcount_t with zfs_refcount_t. Reviewed-by: Franz Pletz <fpletz@fnordicwalking.de> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tim Schumacher <timschumi@gmx.de> Closes openzfs#7885 Closes openzfs#7932
refcount_add was removed from ZFS master in:
Linux 4.19-rc3+ compat: Remove refcount_t compat
openzfs/zfs#7932
It is expected to be removed in zfs-0.7.12 as well. Update Lustre
to use zfs_refcount_add if zfs supports it, and fall back to
refcount_add if not.
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Change-Id: Ib1b2ff13eb4ff8c56dd49a427b9827c6649ecd31
Reviewed-on: https://review.whamcloud.com/33359
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
torvalds/linux@59b57717f ("blkcg: delay blkg destruction until after writeback has finished") added a refcount_t to the blkcg structure. Due to the refcount_t compatibility code, zfs_refcount_t was used by mistake. Resolve this by removing the compatibility code and replacing the occurrences of refcount_t with zfs_refcount_t. Reviewed-by: Franz Pletz <fpletz@fnordicwalking.de> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tim Schumacher <timschumi@gmx.de> Closes #7885 Closes #7932
torvalds/linux@59b57717f ("blkcg: delay blkg destruction until after writeback has finished") added a refcount_t to the blkcg structure. Due to the refcount_t compatibility code, zfs_refcount_t was used by mistake. Resolve this by removing the compatibility code and replacing the occurrences of refcount_t with zfs_refcount_t. Reviewed-by: Franz Pletz <fpletz@fnordicwalking.de> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tim Schumacher <timschumi@gmx.de> Closes openzfs#7885 Closes openzfs#7932
refcount_add was removed from ZFS master in:
Linux 4.19-rc3+ compat: Remove refcount_t compat
openzfs/zfs#7932
It is expected to be removed in zfs-0.7.12 as well. Update Lustre
to use zfs_refcount_add if zfs supports it, and fall back to
refcount_add if not.
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Change-Id: Ib1b2ff13eb4ff8c56dd49a427b9827c6649ecd31
Reviewed-on: https://review.whamcloud.com/33359
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Conflicts:
config/lustre-build-zfs.m4
lustre/osd-zfs/osd_internal.h
lustre/osd-zfs/osd_object.c
refcount_add was removed from ZFS master in:
Linux 4.19-rc3+ compat: Remove refcount_t compat
openzfs/zfs#7932
It is expected to be removed in zfs-0.7.12 as well. Update Lustre
to use zfs_refcount_add if zfs supports it, and fall back to
refcount_add if not.
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Change-Id: Ib1b2ff13eb4ff8c56dd49a427b9827c6649ecd31
Reviewed-on: https://review.whamcloud.com/33359
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Conflicts:
config/lustre-build-zfs.m4
lustre/osd-zfs/osd_internal.h
lustre/osd-zfs/osd_object.c
refcount_add was removed from ZFS master in:
Linux 4.19-rc3+ compat: Remove refcount_t compat
openzfs/zfs#7932
It is expected to be removed in zfs-0.7.12 as well. Update Lustre
to use zfs_refcount_add if zfs supports it, and fall back to
refcount_add if not.
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Change-Id: Ib1b2ff13eb4ff8c56dd49a427b9827c6649ecd31
Reviewed-on: https://review.whamcloud.com/33359
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Cherry-picked from 2.12.2-llnl
89f8ee7 LU-11507 osd-zfs: Use zfs_refcount_add if available
refcount_add was removed from ZFS master in:
Linux 4.19-rc3+ compat: Remove refcount_t compat
openzfs/zfs#7932
It is expected to be removed in zfs-0.7.12 as well. Update Lustre
to use zfs_refcount_add if zfs supports it, and fall back to
refcount_add if not.
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Change-Id: Ib1b2ff13eb4ff8c56dd49a427b9827c6649ecd31
Reviewed-on: https://review.whamcloud.com/33359
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Cherry-picked from 2.12.2-llnl
89f8ee7 LU-11507 osd-zfs: Use zfs_refcount_add if available
Test-Parameters: forbuildonly
refcount_add was removed from ZFS master in:
Linux 4.19-rc3+ compat: Remove refcount_t compat
openzfs/zfs#7932
It is expected to be removed in zfs-0.7.12 as well. Update Lustre
to use zfs_refcount_add if zfs supports it, and fall back to
refcount_add if not.
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Change-Id: Ib1b2ff13eb4ff8c56dd49a427b9827c6649ecd31
Reviewed-on: https://review.whamcloud.com/33359
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Cherry-pick-branch: 2.12.2-llnl
Cherry-pick-hash:89f8ee7
Test-Parameters: forbuildonly
refcount_add was removed from ZFS master in:
Linux 4.19-rc3+ compat: Remove refcount_t compat
openzfs/zfs#7932
It is expected to be removed in zfs-0.7.12 as well. Update Lustre
to use zfs_refcount_add if zfs supports it, and fall back to
refcount_add if not.
Cherry-pick-branch: 2.12.2-llnl
Cherry-pick-hash:89f8ee7
Test-Parameters: forbuildonly
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Change-Id: Ib1b2ff13eb4ff8c56dd49a427b9827c6649ecd31
Motivation and Context
This resolved building ZFS for Linux 4.19-rc3 and above. The reason behind this is that some header file is using refcount_t now (introduced by torvalds/linux@59b5771), which is aliased to zfs_refcount_t due to the compatibility code.
This would fix Issue #7885
Description
This patch removes the compatibility changes for refcount_t and refcount_add and replaces all occurrences of them with their counterpart (i.e. zfs_refcount_t and zfs_refcount_add).
How Has This Been Tested?
I compiled and tested the modules with Linux 4.18.8 and Linux 4.19-rc4.
I haven't run the test suite yet (I'll do that when I have the time), but for now this patch is mainly there to fix building on newer kernel versions.
Types of changes
Checklist:
Signed-off-by.