-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Linux 6.14 compat: Check for migratepage VFS #17217
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
Conversation
The kernel.org 6.14.0 has indeed removed I don't mind this PR as such, because I rather prefer tests that ask for the thing they need, rather than rely on the absence of some other thing, so I'll go test it on some older kernels too. But I'd still like to know what's happening so you needed it? (FWIW, I tend to hold Fedora kernels at arms length when thinking specific kernel versions. They're not as weird as full Redhat kernels can be, but they're still a bit weird. Another reason to test for the specific things we want!) |
config/kernel-vfs-migratepage.m4
Outdated
|
||
static const struct address_space_operations | ||
aops __attribute__ ((unused)) = { | ||
.migrate_page = migrate_page, |
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.
This should be .migratepage
: no one has .migrate_page
:)
module/os/linux/zfs/zpl_file.c
Outdated
@@ -1059,8 +1059,10 @@ const struct address_space_operations zpl_address_space_operations = { | |||
#ifdef HAVE_VFS_MIGRATE_FOLIO | |||
.migrate_folio = migrate_folio, | |||
#else | |||
#ifdef HAVE_VFS_MIGRATEPAGE |
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'd prefer #elif defined(HAVE_VFS_MIGRATEPAGE)
etc but it hardly matters.
FYI, with the test changed to (I did not try using it though) |
Here's the specific failure I'm seeing:
I'm building against the kernel.org 6.14.1 kernel (https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.14.1.tar.xz) which I built using a Now I'm thinking we can just get rid of diff --git a/module/os/linux/zfs/zpl_file.c b/module/os/linux/zfs/zpl_file.c
index 787d3cb31..e6ed55157 100644
--- a/module/os/linux/zfs/zpl_file.c
+++ b/module/os/linux/zfs/zpl_file.c
@@ -1058,8 +1058,6 @@ const struct address_space_operations zpl_address_space_operations = {
#endif
#ifdef HAVE_VFS_MIGRATE_FOLIO
.migrate_folio = migrate_folio,
-#else
- .migratepage = migrate_page,
#endif
};
|
Ahh, I think I see what's happening. The test doesn't just test that I wrote 74ae760 and was just about to offer it, but then realised that's basically what you'd already done! So if you fix up your migratepage test to set Glad to understand it :) |
config/kernel-vfs-migratepage.m4
Outdated
@@ -0,0 +1,27 @@ | |||
dnl # | |||
dnl # Linux 6.14 gets rid of address_space_operations.migratepage |
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.
6.0.
Re getting rid of it, I think we have to keep it - kernel looks like it it doesn't always check for it to be non-NULL when calling it, so we at least have to set it to the fallback. The couple of filesystems that do set it put it behind a |
The 6.0 kernel removes the 'migratepage' VFS op. Check for migratepage. Signed-off-by: Tony Hutter <[email protected]>
@robn thanks for detective work on what was going on. My latest push should include all the changes you were looking for. |
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.
Great 👍
The 6.0 kernel removes the 'migratepage' VFS op. Check for migratepage. Signed-off-by: Tony Hutter <[email protected]> Reviewed-by: Rob Norris <[email protected]> Reviewed-by: Alexander Motin <[email protected]
The 6.0 kernel removes the 'migratepage' VFS op. Check for migratepage. Signed-off-by: Tony Hutter <[email protected]> Reviewed-by: Rob Norris <[email protected]> Reviewed-by: Alexander Motin <[email protected]
The 6.0 kernel removes the 'migratepage' VFS op. Check for migratepage. Signed-off-by: Tony Hutter <[email protected]> Reviewed-by: Rob Norris <[email protected]> Reviewed-by: Alexander Motin <[email protected]
The 6.0 kernel removes the 'migratepage' VFS op. Check for migratepage. Signed-off-by: Tony Hutter <[email protected]> Reviewed-by: Rob Norris <[email protected]> Reviewed-by: Alexander Motin <[email protected]
The 6.0 kernel removes the 'migratepage' VFS op. Check for migratepage. Signed-off-by: Tony Hutter <[email protected]> Reviewed-by: Rob Norris <[email protected]> Reviewed-by: Alexander Motin <[email protected]
The 6.0 kernel removes the 'migratepage' VFS op. Check for migratepage. Signed-off-by: Tony Hutter <[email protected]> Reviewed-by: Rob Norris <[email protected]> Reviewed-by: Alexander Motin <[email protected] (cherry picked from commit ab9bb19)
The 6.0 kernel removes the 'migratepage' VFS op. Check for migratepage. Signed-off-by: Tony Hutter <[email protected]> Reviewed-by: Rob Norris <[email protected]> Reviewed-by: Alexander Motin <[email protected] Closes openzfs#17217 (cherry picked from commit ab9bb19)
Motivation and Context
Support 6.14 kernel.
Description
The 6.14 kernel doesn't expect a 'migratepage' VFS op. Check for migratepage.
I'm not sure how this slipped though the cracks when we bumped META to 6.14. Maybe because I was testing against the Fedora 6.14 kernel and that's different from kernel.org one?
How Has This Been Tested?
Built against kernel.org source with
./configure --with-linux=<path to source>
.Types of changes
Checklist:
Signed-off-by
.