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.
Linux 5.11 compat: revalidate_disk_size()
Both revalidate_disk_size() and revalidate_disk() have been removed. Functionally this isn't a problem because we only relied on these functions to call zvol_revalidate_disk() for us and to perform any additional handling which might be needed for that kernel version. When neither are available we know there's no additional handling needed and we can directly call zvol_revalidate_disk(). Reviewed-by: Rafael Kitover <[email protected]> Reviewed-by: Coleman Kane <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#11387 Closes openzfs#11390
- Loading branch information
1 parent
0160e8e
commit 30e3279
Showing
3 changed files
with
31 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,46 @@ | ||
dnl # | ||
dnl # 5.11 API change | ||
dnl # revalidate_disk_size() has been removed entirely. | ||
dnl # | ||
dnl # 5.10 API change | ||
dnl # revalidate_disk() was replaced by revalidate_disk_size() | ||
dnl # | ||
AC_DEFUN([ZFS_AC_KERNEL_SRC_REVALIDATE_DISK_SIZE], [ | ||
AC_DEFUN([ZFS_AC_KERNEL_SRC_REVALIDATE_DISK], [ | ||
ZFS_LINUX_TEST_SRC([revalidate_disk_size], [ | ||
#include <linux/genhd.h> | ||
], [ | ||
struct gendisk *disk = NULL; | ||
(void) revalidate_disk_size(disk, false); | ||
]) | ||
ZFS_LINUX_TEST_SRC([revalidate_disk], [ | ||
#include <linux/genhd.h> | ||
], [ | ||
struct gendisk *disk = NULL; | ||
(void) revalidate_disk(disk); | ||
]) | ||
]) | ||
|
||
AC_DEFUN([ZFS_AC_KERNEL_REVALIDATE_DISK_SIZE], [ | ||
AC_DEFUN([ZFS_AC_KERNEL_REVALIDATE_DISK], [ | ||
AC_MSG_CHECKING([whether revalidate_disk_size() is available]) | ||
ZFS_LINUX_TEST_RESULT_SYMBOL([revalidate_disk_size], | ||
[revalidate_disk_size], [block/genhd.c], [ | ||
AC_MSG_RESULT(yes) | ||
AC_DEFINE(HAVE_REVALIDATE_DISK_SIZE, 1, | ||
[revalidate_disk_size() is available]) | ||
[revalidate_disk_size() is available]) | ||
], [ | ||
AC_MSG_RESULT(no) | ||
AC_MSG_CHECKING([whether revalidate_disk() is available]) | ||
ZFS_LINUX_TEST_RESULT_SYMBOL([revalidate_disk], | ||
[revalidate_disk], [block/genhd.c], [ | ||
AC_MSG_RESULT(yes) | ||
AC_DEFINE(HAVE_REVALIDATE_DISK, 1, | ||
[revalidate_disk() is available]) | ||
], [ | ||
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