]) # LC_HAVE_FILEMAP_GET_FOLIOS_CONTIG
#
+# LC_HAVE_GET_RANDOM_U32_BELOW
+#
+# Linux commit v6.1-13825-g3c202d14a9d7
+# prandom: remove prandom_u32_max()
+#
+AC_DEFUN([LC_SRC_HAVE_GET_RANDOM_U32_BELOW], [
+ LB2_LINUX_TEST_SRC([get_random_u32_below], [
+ #include <linux/random.h>
+ ],[
+ u32 rand32 = get_random_u32_below(99);
+ (void)rand32;
+ ],[-Werror])
+])
+AC_DEFUN([LC_HAVE_GET_RANDOM_U32_BELOW], [
+ AC_MSG_CHECKING([if get_random_u32_below()is available])
+ LB2_LINUX_TEST_RESULT([get_random_u32_below], [
+ AC_DEFINE(HAVE_GET_RANDOM_U32_BELOW, 1,
+ [get_random_u32_below() is available])
+ ],[
+ AC_DEFINE([get_random_u32_below(v)], [prandom_u32_max(v)],
+ [get_random_u32_below() is not available])
+ ])
+]) # LC_HAVE_GET_RANDOM_U32_BELOW
+
+#
+# LC_HAVE_ACL_WITH_DENTRY
+#
+# Linux commit v6.1-rc1-2-g138060ba92b3
+# fs: pass dentry to set acl method
+# Linux commit v6.1-rc1-4-g7420332a6ff4
+# fs: add new get acl method
+#
+AC_DEFUN([LC_SRC_HAVE_ACL_WITH_DENTRY], [
+ LB2_LINUX_TEST_SRC([acl_with_dentry], [
+ #include <linux/fs.h>
+ ],[
+ struct user_namespace *ns = NULL;
+ struct dentry *dentry = NULL;
+
+ ((struct inode_operations *)1)->get_acl(ns, dentry, 0);
+ (void)ns; (void)dentry;
+ ],[-Werror])
+])
+AC_DEFUN([LC_HAVE_ACL_WITH_DENTRY], [
+ AC_MSG_CHECKING([if 'get_acl' and 'set_acl' use dentry argument])
+ LB2_LINUX_TEST_RESULT([acl_with_dentry], [
+ AC_DEFINE(HAVE_ACL_WITH_DENTRY, 1,
+ ['get_acl' and 'set_acl' use dentry argument])
+ ])
+]) # LC_HAVE_ACL_WITH_DENTRY
+
+#
# LC_PROG_LINUX
#
# Lustre linux kernel checks
LC_SRC_NFS_FILLDIR_USE_CTX_RETURN_BOOL
LC_SRC_HAVE_FILEMAP_GET_FOLIOS_CONTIG
+ # 6.2
+ LC_SRC_HAVE_GET_RANDOM_U32_BELOW
+ LC_SRC_HAVE_ACL_WITH_DENTRY
+
# kernel patch to extend integrity interface
LC_SRC_BIO_INTEGRITY_PREP_FN
])
LC_NFS_FILLDIR_USE_CTX_RETURN_BOOL
LC_HAVE_FILEMAP_GET_FOLIOS_CONTIG
+ # 6.2
+ LC_HAVE_GET_RANDOM_U32_BELOW
+ LC_HAVE_ACL_WITH_DENTRY
+
# kernel patch to extend integrity interface
LC_BIO_INTEGRITY_PREP_FN
])