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.10 compat: revalidate_disk_size() added
A new function was added named revalidate_disk_size() and the old revalidate_disk() appears to have been deprecated. As the only ZFS code that calls this function is zvol_update_volsize, swapping the old function call out for the new one should be all that is required. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#11085
- Loading branch information
1 parent
ae15f1c
commit 59b6872
Showing
3 changed files
with
30 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
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], [ | ||
ZFS_LINUX_TEST_SRC([revalidate_disk_size], [ | ||
#include <linux/genhd.h> | ||
], [ | ||
struct gendisk *disk = NULL; | ||
(void) revalidate_disk_size(disk, false); | ||
]) | ||
]) | ||
|
||
AC_DEFUN([ZFS_AC_KERNEL_REVALIDATE_DISK_SIZE], [ | ||
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]) | ||
], [ | ||
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