-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[2.1] Linux 6.6/6.7/6.8 compat #15860
Commits on Feb 7, 2024
-
Linux 6.6 compat: use inode_get/set_ctime*(...)
In Linux commit 13bc24457850583a2e7203ded05b7209ab4bc5ef, direct access to the i_ctime member of struct inode was removed. The new approach is to use accessor methods that exclusively handle passing the timestamp around by value. This change adds new tests for each of these functions and introduces zpl_* equivalents in include/os/linux/zfs/sys/zpl.h. In where the inode_get/set_ctime*() functions exist, these zpl_* calls will be mapped to the new functions. On older kernels, these macros just wrap direct-access calls. The code that operated on an address of ip->i_ctime to call ZFS_TIME_DECODE() now will take a local copy using zpl_inode_get_ctime(), and then pass the address of the local copy when performing the ZFS_TIME_DECODE() call, in all cases, rather than directly accessing the member. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#15263 Closes openzfs#15257 (cherry picked from commit fe9d409)
Configuration menu - View commit details
-
Copy full SHA for a8f1b5b - Browse repository at this point
Copy the full SHA a8f1b5bView commit details -
Linux 6.6 compat: generic_fillattr has a new u32 request_mask added a…
…t arg2 In commit 0d72b92883c651a11059d93335f33d65c6eb653b, a new u32 argument for the request_mask was added to generic_fillattr. This is the same request_mask for statx that's present in the most recent API implemented by zpl_getattr_impl. This commit conditionally adds it to the zpl_generic_fillattr(...) macro, as well as the zfs_getattr_fast(...) implementation, when configure determines it's present in the kernel's generic_fillattr(...). Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#15263 (cherry picked from commit 21875dd)
Configuration menu - View commit details
-
Copy full SHA for 4b7e39a - Browse repository at this point
Copy the full SHA 4b7e39aView commit details -
Linux 6.6 compat: fsync_bdev() has been removed in favor of sync_bloc…
…kdev() In Linux commit 560e20e4bf6484a0c12f9f3c7a1aa55056948e1e, the fsync_bdev() function was removed in favor of sync_blockdev() to do (roughly) the same thing, given the same input. This change conditionally attempts to call sync_blockdev() if fsync_bdev() isn't discovered during configure. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#15263 (cherry picked from commit 3f67e01)
Configuration menu - View commit details
-
Copy full SHA for 8960e68 - Browse repository at this point
Copy the full SHA 8960e68View commit details -
Linux 6.6 compat: fix configure error with clang (openzfs#15558)
With Linux v6.6.x and clang 16, a configure step fails on a warning that later results in an error while building, due to 'ts' being uninitialized. Add a trivial initialization to silence the warning. Signed-off-by: Jaron Kent-Dobias <jaron@kent-dobias.com> Reviewed-by: Tony Hutter <hutter2@llnl.gov> (cherry picked from commit d813aa8)
Configuration menu - View commit details
-
Copy full SHA for c6fa034 - Browse repository at this point
Copy the full SHA c6fa034View commit details -
linux 6.7 compat: simplify current_time() check
6.7 changed the names of the time members in struct inode, so we can't assign back to it because we don't know its name. In practice this doesn't matter though - if we're missing current_time(), then we must be on <4.9, and we know our fallback will need to return timespec. Signed-off-by: Rob Norris <robn@despairlabs.com> Sponsored-by: https://github.com/sponsors/robn (cherry picked from commit b3626f0)
Configuration menu - View commit details
-
Copy full SHA for 5bc85c9 - Browse repository at this point
Copy the full SHA 5bc85c9View commit details -
linux 6.7 compat: use inode atime/mtime accessors
6.6 made i_ctime inaccessible; 6.7 has done the same for i_atime and i_mtime. This extends the method used for ctime in b37f293 to atime and mtime as well. Signed-off-by: Rob Norris <robn@despairlabs.com> Sponsored-by: https://github.com/sponsors/robn (cherry picked from commit 3c13601)
Configuration menu - View commit details
-
Copy full SHA for 136aa42 - Browse repository at this point
Copy the full SHA 136aa42View commit details -
linux 6.7 compat: handle superblock shrinker member change
In 6.7 the superblock shrinker member s_shrink has changed from being an embedded struct to a pointer. Detect this, and don't take a reference if it already is one. Signed-off-by: Rob Norris <robn@despairlabs.com> Sponsored-by: https://github.com/sponsors/robn (cherry picked from commit 18a9185)
Configuration menu - View commit details
-
Copy full SHA for 36acc9b - Browse repository at this point
Copy the full SHA 36acc9bView commit details -
linux 6.7 compat: rework shrinker setup for heap allocations
6.7 changes the shrinker API such that shrinkers must be allocated dynamically by the kernel. To accomodate this, this commit reworks spl_register_shrinker() to do something similar against earlier kernels. Signed-off-by: Rob Norris <robn@despairlabs.com> Sponsored-by: https://github.com/sponsors/robn (cherry picked from commit 03b8409)
Configuration menu - View commit details
-
Copy full SHA for e92ae1b - Browse repository at this point
Copy the full SHA e92ae1bView commit details -
Linux 6.5 compat: check BLK_OPEN_EXCL is defined
On some systems we already have blkdev_get_by_path() with 4 args but still the old FMODE_EXCL and not BLK_OPEN_EXCL defined. The vdev_bdev_mode() function was added to handle this case but there was no generic way to specify exclusive access. Reviewed-by: Brian Atkinson <batkinson@lanl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes openzfs#15692 (cherry picked from commit d530d5d)
Configuration menu - View commit details
-
Copy full SHA for d094732 - Browse repository at this point
Copy the full SHA d094732View commit details -
Linux 6.7 compat: zfs_setattr fix atime update
In db4fc55 I messed up and changed this bit of code to set the inode atime to an uninitialised value, when actually it was just supposed to loading the atime from the inode to be stored in the SA. This changes it to what it should have been. Ensure times change by the right amount Previously, we only checked if the times changed at all, which missed a bug where the atime was being set to an undefined value. Now ensure the times change by two seconds (or thereabouts), ensuring we catch cases where we set the time to something bonkers Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rob Norris <robn@despairlabs.com> Sponsored-by: https://despairlabs.com/sponsor/ Closes openzfs#15762 Closes openzfs#15773 (cherry picked from commit 2ecc2df)
Configuration menu - View commit details
-
Copy full SHA for 701d706 - Browse repository at this point
Copy the full SHA 701d706View commit details -
Linux 6.8 compat: make test functions static
The kernel is now being compiled with -Wmissing-prototypes. Most of our test stub functions had no prototype, and failed to compile. Since they don't need to be visible anywhere else, just make them all static. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rob Norris <robn@despairlabs.com> Sponsored-by: https://despairlabs.com/sponsor/ Closes openzfs#15805 (cherry picked from commit 64afc4e)
Configuration menu - View commit details
-
Copy full SHA for 133b71b - Browse repository at this point
Copy the full SHA 133b71bView commit details -
Linux 6.8 compat: update for new bdev access functions
blkdev_get_by_path() and blkdev_put() have been replaced by bdev_open_by_path() and bdev_release(), which return a "handle" object with the bdev object itself inside. This adds detection for the new functions, and macros to handle the old and new forms consistently. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rob Norris <robn@despairlabs.com> Sponsored-by: https://despairlabs.com/sponsor/ Closes openzfs#15805 (cherry picked from commit ce782d0)
Configuration menu - View commit details
-
Copy full SHA for 5e9a38c - Browse repository at this point
Copy the full SHA 5e9a38cView commit details
Commits on Feb 8, 2024
-
Linux 6.8 compat: implement strlcpy fallback
Linux has removed strlcpy in favour of strscpy. This implements a fallback implementation of strlcpy for this case. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rob Norris <robn@despairlabs.com> Sponsored-by: https://despairlabs.com/sponsor/ Closes openzfs#15805 (cherry picked from commit 7466e09)
Configuration menu - View commit details
-
Copy full SHA for 90ef2d4 - Browse repository at this point
Copy the full SHA 90ef2d4View commit details -
Linux 6.8 compat: replace MAX_ORDER define
MAX_ORDER has been renamed to MAX_PAGE_ORDER. Rather than just redefining it, instead define our own name and set it consistently from the start. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rob Norris <robn@despairlabs.com> Sponsored-by: https://despairlabs.com/sponsor/ Closes openzfs#15805 (cherry picked from commit 09e6724)
Configuration menu - View commit details
-
Copy full SHA for 9d68afb - Browse repository at this point
Copy the full SHA 9d68afbView commit details