diff options
author | Brian Behlendorf <[email protected]> | 2019-11-12 08:59:06 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-12 08:59:06 -0800 |
commit | 066e825221012e1e81ccf46b0448772bdd7e5483 (patch) | |
tree | 7e071cb3446bccc4ae45c7db7aa5f84cc4a9c8c2 /module/os/linux/spl | |
parent | 035ebb365383dcca71c4c542093ea1ad2b8e1dea (diff) |
Linux compat: Minimum kernel version 3.10
Increase the minimum supported kernel version from 2.6.32 to 3.10.
This removes support for the following Linux enterprise distributions.
Distribution | Kernel | End of Life
---------------- | ------ | -------------
Ubuntu 12.04 LTS | 3.2 | Apr 28, 2017
SLES 11 | 3.0 | Mar 32, 2019
RHEL / CentOS 6 | 2.6.32 | Nov 30, 2020
The following changes were made as part of removing support.
* Updated `configure` to enforce a minimum kernel version as
specified in the META file (Linux-Minimum: 3.10).
configure: error:
*** Cannot build against kernel version 2.6.32.
*** The minimum supported kernel version is 3.10.
* Removed all `configure` kABI checks and matching C code for
interfaces which solely predate the Linux 3.10 kernel.
* Updated all `configure` kABI checks to fail when an interface is
missing which was in the 3.10 kernel up to the latest 5.1 kernel.
Removed the HAVE_* preprocessor defines for these checks and
updated the code to unconditionally use the verified interface.
* Inverted the detection logic in several kABI checks to match
the new interface as it appears in 3.10 and newer and not the
legacy interface.
* Consolidated the following checks in to individual files. Due
the large number of changes in the checks it made sense to handle
this now. It would be desirable to group other related checks in
the same fashion, but this as left as future work.
- config/kernel-blkdev.m4 - Block device kABI checks
- config/kernel-blk-queue.m4 - Block queue kABI checks
- config/kernel-bio.m4 - Bio interface kABI checks
* Removed the kABI checks for sops->nr_cached_objects() and
sops->free_cached_objects(). These interfaces are currently unused.
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #9566
Diffstat (limited to 'module/os/linux/spl')
-rw-r--r-- | module/os/linux/spl/spl-cred.c | 4 | ||||
-rw-r--r-- | module/os/linux/spl/spl-kmem-cache.c | 5 | ||||
-rw-r--r-- | module/os/linux/spl/spl-proc.c | 3 | ||||
-rw-r--r-- | module/os/linux/spl/spl-vnode.c | 38 | ||||
-rw-r--r-- | module/os/linux/spl/spl-zlib.c | 2 |
5 files changed, 1 insertions, 51 deletions
diff --git a/module/os/linux/spl/spl-cred.c b/module/os/linux/spl/spl-cred.c index ea3e903f9..6e93a32e6 100644 --- a/module/os/linux/spl/spl-cred.c +++ b/module/os/linux/spl/spl-cred.c @@ -27,11 +27,7 @@ #include <sys/cred.h> static int -#ifdef HAVE_KUIDGID_T cr_groups_search(const struct group_info *group_info, kgid_t grp) -#else -cr_groups_search(const struct group_info *group_info, gid_t grp) -#endif { unsigned int left, right, mid; int cmp; diff --git a/module/os/linux/spl/spl-kmem-cache.c b/module/os/linux/spl/spl-kmem-cache.c index 865f2e2f8..88c7e2507 100644 --- a/module/os/linux/spl/spl-kmem-cache.c +++ b/module/os/linux/spl/spl-kmem-cache.c @@ -1030,11 +1030,6 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, goto out; } -#if defined(HAVE_KMEM_CACHE_ALLOCFLAGS) - skc->skc_linux_cache->allocflags |= __GFP_COMP; -#elif defined(HAVE_KMEM_CACHE_GFPFLAGS) - skc->skc_linux_cache->gfpflags |= __GFP_COMP; -#endif skc->skc_flags |= KMC_NOMAGAZINE; } diff --git a/module/os/linux/spl/spl-proc.c b/module/os/linux/spl/spl-proc.c index 13eaa6301..2dce8cd70 100644 --- a/module/os/linux/spl/spl-proc.c +++ b/module/os/linux/spl/spl-proc.c @@ -712,9 +712,6 @@ static struct ctl_table spl_dir[] = { static struct ctl_table spl_root[] = { { -#ifdef HAVE_CTL_NAME - .ctl_name = CTL_KERN, -#endif .procname = "kernel", .mode = 0555, .child = spl_dir, diff --git a/module/os/linux/spl/spl-vnode.c b/module/os/linux/spl/spl-vnode.c index d9056c964..5de350f10 100644 --- a/module/os/linux/spl/spl-vnode.c +++ b/module/os/linux/spl/spl-vnode.c @@ -48,17 +48,8 @@ spl_filp_fallocate(struct file *fp, int mode, loff_t offset, loff_t len) { int error = -EOPNOTSUPP; -#ifdef HAVE_FILE_FALLOCATE if (fp->f_op->fallocate) error = fp->f_op->fallocate(fp, mode, offset, len); -#else -#ifdef HAVE_INODE_FALLOCATE - if (fp->f_dentry && fp->f_dentry->d_inode && - fp->f_dentry->d_inode->i_op->fallocate) - error = fp->f_dentry->d_inode->i_op->fallocate( - fp->f_dentry->d_inode, mode, offset, len); -#endif /* HAVE_INODE_FALLOCATE */ -#endif /* HAVE_FILE_FALLOCATE */ return (error); } @@ -66,11 +57,7 @@ spl_filp_fallocate(struct file *fp, int mode, loff_t offset, loff_t len) static int spl_filp_fsync(struct file *fp, int sync) { -#ifdef HAVE_2ARGS_VFS_FSYNC return (vfs_fsync(fp, sync)); -#else - return (vfs_fsync(fp, (fp)->f_dentry, sync)); -#endif /* HAVE_2ARGS_VFS_FSYNC */ } static ssize_t @@ -456,31 +443,6 @@ int vn_space(vnode_t *vp, int cmd, struct flock *bfp, int flag, if (error == 0) return (0); #endif - -#ifdef HAVE_INODE_TRUNCATE_RANGE - if (vp->v_file->f_dentry && vp->v_file->f_dentry->d_inode && - vp->v_file->f_dentry->d_inode->i_op && - vp->v_file->f_dentry->d_inode->i_op->truncate_range) { - off_t end = bfp->l_start + bfp->l_len; - /* - * Judging from the code in shmem_truncate_range(), - * it seems the kernel expects the end offset to be - * inclusive and aligned to the end of a page. - */ - if (end % PAGE_SIZE != 0) { - end &= ~(off_t)(PAGE_SIZE - 1); - if (end <= bfp->l_start) - return (0); - } - --end; - - vp->v_file->f_dentry->d_inode->i_op->truncate_range( - vp->v_file->f_dentry->d_inode, bfp->l_start, end); - - return (0); - } -#endif - return (error); } EXPORT_SYMBOL(vn_space); diff --git a/module/os/linux/spl/spl-zlib.c b/module/os/linux/spl/spl-zlib.c index 62423343c..84026d710 100644 --- a/module/os/linux/spl/spl-zlib.c +++ b/module/os/linux/spl/spl-zlib.c @@ -196,7 +196,7 @@ spl_zlib_init(void) { int size; - size = MAX(spl_zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL), + size = MAX(zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL), zlib_inflate_workspacesize()); zlib_workspace_cache = kmem_cache_create( |