Skip to content

Commit 066e825

Browse files
authored
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
1 parent 035ebb3 commit 066e825

File tree

102 files changed

+1136
-2965
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+1136
-2965
lines changed

META

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ Release-Tags: relext
77
License: CDDL
88
Author: OpenZFS on Linux
99
Linux-Maximum: 5.1
10-
Linux-Minimum: 2.6.32
10+
Linux-Minimum: 3.10

config/kernel-acl.m4

Lines changed: 15 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,10 @@ AC_DEFUN([ZFS_AC_KERNEL_SET_CACHED_ACL_USABLE], [
6666

6767
dnl #
6868
dnl # 3.1 API change,
69-
dnl # posix_acl_chmod_masq() is not exported anymore and posix_acl_chmod()
70-
dnl # was introduced to replace it.
69+
dnl # posix_acl_chmod() was added as the preferred interface.
7170
dnl #
7271
dnl # 3.14 API change,
73-
dnl # posix_acl_chmod() is changed to __posix_acl_chmod()
72+
dnl # posix_acl_chmod() was changed to __posix_acl_chmod()
7473
dnl #
7574
AC_DEFUN([ZFS_AC_KERNEL_SRC_POSIX_ACL_CHMOD], [
7675
ZFS_LINUX_TEST_SRC([posix_acl_chmod], [
@@ -89,46 +88,45 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_POSIX_ACL_CHMOD], [
8988
])
9089

9190
AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_CHMOD], [
92-
AC_MSG_CHECKING([whether posix_acl_chmod exists])
93-
ZFS_LINUX_TEST_RESULT([posix_acl_chmod], [
94-
AC_MSG_RESULT(yes)
95-
AC_DEFINE(HAVE_POSIX_ACL_CHMOD, 1, [posix_acl_chmod() exists])
96-
],[
97-
AC_MSG_RESULT(no)
98-
])
99-
10091
AC_MSG_CHECKING([whether __posix_acl_chmod exists])
10192
ZFS_LINUX_TEST_RESULT([__posix_acl_chmod], [
10293
AC_MSG_RESULT(yes)
10394
AC_DEFINE(HAVE___POSIX_ACL_CHMOD, 1,
10495
[__posix_acl_chmod() exists])
10596
],[
10697
AC_MSG_RESULT(no)
98+
99+
AC_MSG_CHECKING([whether posix_acl_chmod exists])
100+
ZFS_LINUX_TEST_RESULT([posix_acl_chmod], [
101+
AC_MSG_RESULT(yes)
102+
AC_DEFINE(HAVE_POSIX_ACL_CHMOD, 1,
103+
[posix_acl_chmod() exists])
104+
],[
105+
ZFS_LINUX_TEST_ERROR([posix_acl_chmod()])
106+
])
107107
])
108108
])
109109

110110
dnl #
111111
dnl # 3.1 API change,
112-
dnl # posix_acl_equiv_mode now wants an umode_t* instead of a mode_t*
112+
dnl # posix_acl_equiv_mode now wants an umode_t instead of a mode_t
113113
dnl #
114114
AC_DEFUN([ZFS_AC_KERNEL_SRC_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T], [
115115
ZFS_LINUX_TEST_SRC([posix_acl_equiv_mode], [
116116
#include <linux/fs.h>
117117
#include <linux/posix_acl.h>
118118
],[
119119
umode_t tmp;
120-
posix_acl_equiv_mode(NULL,&tmp);
120+
posix_acl_equiv_mode(NULL, &tmp);
121121
])
122122
])
123123

124124
AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T], [
125125
AC_MSG_CHECKING([whether posix_acl_equiv_mode() wants umode_t])
126126
ZFS_LINUX_TEST_RESULT([posix_acl_equiv_mode], [
127127
AC_MSG_RESULT(yes)
128-
AC_DEFINE(HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T, 1,
129-
[posix_acl_equiv_mode wants umode_t*])
130128
],[
131-
AC_MSG_RESULT(no)
129+
ZFS_LINUX_TEST_ERROR([posix_acl_equiv_mode()])
132130
])
133131
])
134132

@@ -160,123 +158,6 @@ AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_VALID_WITH_NS], [
160158
])
161159
])
162160

163-
dnl #
164-
dnl # 2.6.27 API change,
165-
dnl # Check if inode_operations contains the function permission
166-
dnl # and expects the nameidata structure to have been removed.
167-
dnl #
168-
AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_PERMISSION], [
169-
ZFS_LINUX_TEST_SRC([inode_operations_permission], [
170-
#include <linux/fs.h>
171-
172-
int permission_fn(struct inode *inode, int mask) { return 0; }
173-
174-
static const struct inode_operations
175-
iops __attribute__ ((unused)) = {
176-
.permission = permission_fn,
177-
};
178-
],[])
179-
])
180-
181-
AC_DEFUN([ZFS_AC_KERNEL_INODE_OPERATIONS_PERMISSION], [
182-
AC_MSG_CHECKING([whether iops->permission() exists])
183-
ZFS_LINUX_TEST_RESULT([inode_operations_permission], [
184-
AC_MSG_RESULT(yes)
185-
AC_DEFINE(HAVE_PERMISSION, 1, [iops->permission() exists])
186-
],[
187-
AC_MSG_RESULT(no)
188-
])
189-
])
190-
191-
dnl #
192-
dnl # 2.6.26 API change,
193-
dnl # Check if inode_operations contains the function permission
194-
dnl # and expects the nameidata structure to be passed.
195-
dnl #
196-
AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_PERMISSION_WITH_NAMEIDATA], [
197-
ZFS_LINUX_TEST_SRC([inode_operations_permission_with_nameidata], [
198-
#include <linux/fs.h>
199-
#include <linux/sched.h>
200-
201-
int permission_fn(struct inode *inode, int mask,
202-
struct nameidata *nd) { return 0; }
203-
204-
static const struct inode_operations
205-
iops __attribute__ ((unused)) = {
206-
.permission = permission_fn,
207-
};
208-
],[])
209-
])
210-
211-
AC_DEFUN([ZFS_AC_KERNEL_INODE_OPERATIONS_PERMISSION_WITH_NAMEIDATA], [
212-
AC_MSG_CHECKING([whether iops->permission() wants nameidata])
213-
ZFS_LINUX_TEST_RESULT([inode_operations_permission_with_nameidata], [
214-
AC_MSG_RESULT(yes)
215-
AC_DEFINE(HAVE_PERMISSION, 1, [iops->permission() exists])
216-
AC_DEFINE(HAVE_PERMISSION_WITH_NAMEIDATA, 1,
217-
[iops->permission() with nameidata exists])
218-
],[
219-
AC_MSG_RESULT(no)
220-
])
221-
])
222-
223-
dnl #
224-
dnl # 2.6.32 API change,
225-
dnl # Check if inode_operations contains the function check_acl
226-
dnl #
227-
AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_CHECK_ACL], [
228-
ZFS_LINUX_TEST_SRC([inode_operations_check_acl], [
229-
#include <linux/fs.h>
230-
231-
int check_acl_fn(struct inode *inode, int mask) { return 0; }
232-
233-
static const struct inode_operations
234-
iops __attribute__ ((unused)) = {
235-
.check_acl = check_acl_fn,
236-
};
237-
],[])
238-
])
239-
240-
AC_DEFUN([ZFS_AC_KERNEL_INODE_OPERATIONS_CHECK_ACL], [
241-
AC_MSG_CHECKING([whether iops->check_acl() exists])
242-
ZFS_LINUX_TEST_RESULT([inode_operations_check_acl], [
243-
AC_MSG_RESULT(yes)
244-
AC_DEFINE(HAVE_CHECK_ACL, 1, [iops->check_acl() exists])
245-
],[
246-
AC_MSG_RESULT(no)
247-
])
248-
])
249-
250-
dnl #
251-
dnl # 2.6.38 API change,
252-
dnl # The function check_acl gained a new parameter: flags
253-
dnl #
254-
AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_CHECK_ACL_WITH_FLAGS], [
255-
ZFS_LINUX_TEST_SRC([inode_operations_check_acl_with_flags], [
256-
#include <linux/fs.h>
257-
258-
int check_acl_fn(struct inode *inode, int mask,
259-
unsigned int flags) { return 0; }
260-
261-
static const struct inode_operations
262-
iops __attribute__ ((unused)) = {
263-
.check_acl = check_acl_fn,
264-
};
265-
],[])
266-
])
267-
268-
AC_DEFUN([ZFS_AC_KERNEL_INODE_OPERATIONS_CHECK_ACL_WITH_FLAGS], [
269-
AC_MSG_CHECKING([whether iops->check_acl() wants flags])
270-
ZFS_LINUX_TEST_RESULT([inode_operations_check_acl_with_flags], [
271-
AC_MSG_RESULT(yes)
272-
AC_DEFINE(HAVE_CHECK_ACL, 1, [iops->check_acl() exists])
273-
AC_DEFINE(HAVE_CHECK_ACL_WITH_FLAGS, 1,
274-
[iops->check_acl() wants flags])
275-
],[
276-
AC_MSG_RESULT(no)
277-
])
278-
])
279-
280161
dnl #
281162
dnl # 3.1 API change,
282163
dnl # Check if inode_operations contains the function get_acl
@@ -299,9 +180,8 @@ AC_DEFUN([ZFS_AC_KERNEL_INODE_OPERATIONS_GET_ACL], [
299180
AC_MSG_CHECKING([whether iops->get_acl() exists])
300181
ZFS_LINUX_TEST_RESULT([inode_operations_get_acl], [
301182
AC_MSG_RESULT(yes)
302-
AC_DEFINE(HAVE_GET_ACL, 1, [iops->get_acl() exists])
303183
],[
304-
AC_MSG_RESULT(no)
184+
ZFS_LINUX_TEST_ERROR([iops->get_acl()])
305185
])
306186
])
307187

@@ -390,10 +270,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_ACL], [
390270
ZFS_AC_KERNEL_SRC_POSIX_ACL_CHMOD
391271
ZFS_AC_KERNEL_SRC_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T
392272
ZFS_AC_KERNEL_SRC_POSIX_ACL_VALID_WITH_NS
393-
ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_PERMISSION
394-
ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_PERMISSION_WITH_NAMEIDATA
395-
ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_CHECK_ACL
396-
ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_CHECK_ACL_WITH_FLAGS
397273
ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_GET_ACL
398274
ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL
399275
ZFS_AC_KERNEL_SRC_GET_ACL_HANDLE_CACHE
@@ -406,10 +282,6 @@ AC_DEFUN([ZFS_AC_KERNEL_ACL], [
406282
ZFS_AC_KERNEL_POSIX_ACL_CHMOD
407283
ZFS_AC_KERNEL_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T
408284
ZFS_AC_KERNEL_POSIX_ACL_VALID_WITH_NS
409-
ZFS_AC_KERNEL_INODE_OPERATIONS_PERMISSION
410-
ZFS_AC_KERNEL_INODE_OPERATIONS_PERMISSION_WITH_NAMEIDATA
411-
ZFS_AC_KERNEL_INODE_OPERATIONS_CHECK_ACL
412-
ZFS_AC_KERNEL_INODE_OPERATIONS_CHECK_ACL_WITH_FLAGS
413285
ZFS_AC_KERNEL_INODE_OPERATIONS_GET_ACL
414286
ZFS_AC_KERNEL_INODE_OPERATIONS_SET_ACL
415287
ZFS_AC_KERNEL_GET_ACL_HANDLE_CACHE

config/kernel-automount.m4

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,14 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_AUTOMOUNT], [
1212
struct dentry_operations dops __attribute__ ((unused)) = {
1313
.d_automount = d_automount,
1414
};
15-
],[])
15+
])
1616
])
1717

1818
AC_DEFUN([ZFS_AC_KERNEL_AUTOMOUNT], [
1919
AC_MSG_CHECKING([whether dops->d_automount() exists])
2020
ZFS_LINUX_TEST_RESULT([dentry_operations_d_automount], [
2121
AC_MSG_RESULT(yes)
22-
AC_DEFINE(HAVE_AUTOMOUNT, 1, [dops->automount() exists])
2322
],[
24-
AC_MSG_RESULT(no)
23+
ZFS_LINUX_TEST_ERROR([dops->d_automount()])
2524
])
2625
])

config/kernel-bdev-logical-size.m4

Lines changed: 0 additions & 26 deletions
This file was deleted.

config/kernel-bdev-physical-size.m4

Lines changed: 0 additions & 40 deletions
This file was deleted.

config/kernel-bdi.m4

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,7 @@ AC_DEFUN([ZFS_AC_KERNEL_BDI], [
7272
AC_DEFINE(HAVE_3ARGS_BDI_SETUP_AND_REGISTER, 1,
7373
[bdi_setup_and_register() wants 3 args])
7474
], [
75-
dnl #
76-
dnl # 2.6.32 - 2.6.33, bdi_setup_and_register()
77-
dnl # is not exported.
78-
dnl #
79-
AC_MSG_RESULT(no)
75+
ZFS_LINUX_TEST_ERROR([bdi_setup])
8076
])
8177
])
8278
])

config/kernel-bio-bvec-iter.m4

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)