Introduce ZFS_LINUX_REQUIRE_API autoconf macro

Currently, if API tests fail, we either ignore the failures, or
unconditionally halt the kernel build.  This leads to situations where
incompatibilities with existing APIs may develop, but not trip the
configure compatibility checks.

This introduces a new mechanism to require APIs for kernels above a
particular version.  While not perfect, this at least guarantees
mainline kernels do not break existing APIs without at least providing
some warning.

Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Antonio Russo <aerusso@aerusso.net>
Closes #14343
This commit is contained in:
Antonio Russo
2023-01-04 21:41:16 -07:00
committed by Brian Behlendorf
parent d27c81847b
commit 556ed09537
2 changed files with 33 additions and 1 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TMPFILE], [
AC_DEFINE(HAVE_TMPFILE, 1, [i_op->tmpfile() exists])
AC_DEFINE(HAVE_TMPFILE_DENTRY, 1, [i_op->tmpfile() uses old dentry signature])
],[
AC_MSG_RESULT(no)
ZFS_LINUX_REQUIRE_API([i_op->tmpfile()], [3.11])
])
])
])