forked from openzfs/zfs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request openzfs#58 from truenas/NAS-115790
Merge zfs-2.1.5-staging
- Loading branch information
Showing
38 changed files
with
729 additions
and
396 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
dnl # | ||
dnl # 5.17 API change, | ||
dnl # | ||
dnl # GENHD_FL_EXT_DEVT flag removed | ||
dnl # GENHD_FL_NO_PART_SCAN renamed GENHD_FL_NO_PART | ||
dnl # | ||
AC_DEFUN([ZFS_AC_KERNEL_SRC_GENHD_FLAGS], [ | ||
ZFS_LINUX_TEST_SRC([genhd_fl_ext_devt], [ | ||
#include <linux/blkdev.h> | ||
], [ | ||
int flags __attribute__ ((unused)) = GENHD_FL_EXT_DEVT; | ||
]) | ||
ZFS_LINUX_TEST_SRC([genhd_fl_no_part], [ | ||
#include <linux/blkdev.h> | ||
], [ | ||
int flags __attribute__ ((unused)) = GENHD_FL_NO_PART; | ||
]) | ||
ZFS_LINUX_TEST_SRC([genhd_fl_no_part_scan], [ | ||
#include <linux/blkdev.h> | ||
], [ | ||
int flags __attribute__ ((unused)) = GENHD_FL_NO_PART_SCAN; | ||
]) | ||
]) | ||
|
||
AC_DEFUN([ZFS_AC_KERNEL_GENHD_FLAGS], [ | ||
AC_MSG_CHECKING([whether GENHD_FL_EXT_DEVT flag is available]) | ||
ZFS_LINUX_TEST_RESULT([genhd_fl_ext_devt], [ | ||
AC_MSG_RESULT(yes) | ||
AC_DEFINE(ZFS_GENHD_FL_EXT_DEVT, GENHD_FL_EXT_DEVT, | ||
[GENHD_FL_EXT_DEVT flag is available]) | ||
], [ | ||
AC_MSG_RESULT(no) | ||
AC_DEFINE(ZFS_GENHD_FL_EXT_DEVT, 0, | ||
[GENHD_FL_EXT_DEVT flag is not available]) | ||
]) | ||
AC_MSG_CHECKING([whether GENHD_FL_NO_PART flag is available]) | ||
ZFS_LINUX_TEST_RESULT([genhd_fl_no_part], [ | ||
AC_MSG_RESULT(yes) | ||
AC_DEFINE(ZFS_GENHD_FL_NO_PART, GENHD_FL_NO_PART, | ||
[GENHD_FL_NO_PART flag is available]) | ||
], [ | ||
AC_MSG_RESULT(no) | ||
AC_MSG_CHECKING([whether GENHD_FL_NO_PART_SCAN flag is available]) | ||
ZFS_LINUX_TEST_RESULT([genhd_fl_no_part_scan], [ | ||
AC_MSG_RESULT(yes) | ||
AC_DEFINE(ZFS_GENHD_FL_NO_PART, GENHD_FL_NO_PART_SCAN, | ||
[GENHD_FL_NO_PART_SCAN flag is available]) | ||
], [ | ||
ZFS_LINUX_TEST_ERROR([GENHD_FL_NO_PART|GENHD_FL_NO_PART_SCAN]) | ||
]) | ||
]) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
dnl # | ||
dnl # Linux 5.18 removes address_space_operations ->readpages in favour of | ||
dnl # ->readahead | ||
dnl # | ||
AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_READPAGES], [ | ||
ZFS_LINUX_TEST_SRC([vfs_has_readpages], [ | ||
#include <linux/fs.h> | ||
static const struct address_space_operations | ||
aops __attribute__ ((unused)) = { | ||
.readpages = NULL, | ||
}; | ||
],[]) | ||
]) | ||
|
||
AC_DEFUN([ZFS_AC_KERNEL_VFS_READPAGES], [ | ||
AC_MSG_CHECKING([address_space_operations->readpages exists]) | ||
ZFS_LINUX_TEST_RESULT([vfs_has_readpages], [ | ||
AC_MSG_RESULT([yes]) | ||
AC_DEFINE(HAVE_VFS_READPAGES, 1, | ||
[address_space_operations->readpages exists]) | ||
],[ | ||
AC_MSG_RESULT([no]) | ||
]) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
dnl # | ||
dnl # Linux 5.2/5.18 API | ||
dnl # | ||
dnl # In cdb4f26a63c391317e335e6e683a614358e70aeb ("kobject: kobj_type: remove default_attrs") | ||
dnl # struct kobj_type.default_attrs | ||
dnl # was finally removed in favour of | ||
dnl # struct kobj_type.default_groups | ||
dnl # | ||
dnl # This was added in aa30f47cf666111f6bbfd15f290a27e8a7b9d854 ("kobject: Add support for default attribute groups to kobj_type"), | ||
dnl # if both are present (5.2-5.17), we prefer default_groups; they're otherwise equivalent | ||
dnl # | ||
AC_DEFUN([ZFS_AC_KERNEL_SRC_SYSFS_DEFAULT_GROUPS], [ | ||
ZFS_LINUX_TEST_SRC([sysfs_default_groups], [ | ||
#include <linux/kobject.h> | ||
],[ | ||
struct kobj_type __attribute__ ((unused)) kt = { | ||
.default_groups = (const struct attribute_group **)NULL }; | ||
]) | ||
]) | ||
|
||
AC_DEFUN([ZFS_AC_KERNEL_SYSFS_DEFAULT_GROUPS], [ | ||
AC_MSG_CHECKING([for struct kobj_type.default_groups]) | ||
ZFS_LINUX_TEST_RESULT([sysfs_default_groups],[ | ||
AC_MSG_RESULT(yes) | ||
AC_DEFINE([HAVE_SYSFS_DEFAULT_GROUPS], 1, [struct kobj_type has default_groups]) | ||
],[ | ||
AC_MSG_RESULT(no) | ||
]) | ||
]) | ||
|
||
AC_DEFUN([ZFS_AC_KERNEL_SRC_SYSFS], [ | ||
ZFS_AC_KERNEL_SRC_SYSFS_DEFAULT_GROUPS | ||
]) | ||
|
||
AC_DEFUN([ZFS_AC_KERNEL_SYSFS], [ | ||
ZFS_AC_KERNEL_SYSFS_DEFAULT_GROUPS | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.