-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
linux-6.6: fsync_bdev() has been removed in favor of sync_blockdev()
In Linux commit 00c5495c54f785beb0f6a34f7a3674d3ea0997d5, the fsync_bdev() function was removed in favor of sync_blockdev() to do (roughly) the same thing, given the same input. This change conditionally attempts to call sync_blockdev() if fsync_bdev() isn't discovered during configure. Signed-off-by: Coleman Kane <ckane@colemankane.org>
- Loading branch information
Showing
3 changed files
with
44 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,36 @@ | ||
dnl # | ||
dnl # 6.6 API change, | ||
dnl # fsync_bdev was removed in favor of sync_blockdev | ||
dnl # | ||
AC_DEFUN([ZFS_AC_KERNEL_SRC_SYNC_BDEV], [ | ||
ZFS_LINUX_TEST_SRC([fsync_bdev], [ | ||
#include <linux/blkdev.h> | ||
],[ | ||
fsync_bdev(NULL); | ||
]) | ||
ZFS_LINUX_TEST_SRC([sync_blockdev], [ | ||
#include <linux/blkdev.h> | ||
],[ | ||
sync_blockdev(NULL); | ||
]) | ||
]) | ||
|
||
AC_DEFUN([ZFS_AC_KERNEL_SYNC_BDEV], [ | ||
AC_MSG_CHECKING([whether fsync_bdev() exists]) | ||
ZFS_LINUX_TEST_RESULT([fsync_bdev], [ | ||
AC_MSG_RESULT(yes) | ||
AC_DEFINE(HAVE_FSYNC_BDEV, 1, | ||
[fsync_bdev() is declared in include/blkdev.h]) | ||
],[ | ||
AC_MSG_CHECKING([whether sync_blockdev() exists]) | ||
ZFS_LINUX_TEST_RESULT([sync_blockdev], [ | ||
AC_MSG_RESULT(yes) | ||
AC_DEFINE(HAVE_SYNC_BLOCKDEV, 1, | ||
[sync_blockdev() is declared in include/blkdev.h]) | ||
],[ | ||
ZFS_LINUX_TEST_ERROR( | ||
[neither fsync_bdev() nor sync_blockdev() exist]) | ||
]) | ||
]) | ||
]) |
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