mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-06-25 10:38:00 +03:00

If the kernel will honour our error returns, use them. If not, fool it by setting a writeback error on the superblock, if available. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Paul Dagnelie <paul.dagnelie@klarasystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes #17420
28 lines
782 B
Plaintext
28 lines
782 B
Plaintext
# dnl
|
|
# dnl 5.8 (735e4ae5ba28) introduced a superblock scoped errseq_t to use to
|
|
# dnl record writeback errors for syncfs() to return. Up until 5.17, when
|
|
# dnl sync_fs errors were returned directly, this is the only way for us to
|
|
# dnl report an error from syncfs().
|
|
# dnl
|
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_WB_ERR], [
|
|
ZFS_LINUX_TEST_SRC([super_block_s_wb_err], [
|
|
#include <linux/fs.h>
|
|
|
|
static const struct super_block
|
|
sb __attribute__ ((unused)) = {
|
|
.s_wb_err = 0,
|
|
};
|
|
],[])
|
|
])
|
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_SUPER_BLOCK_S_WB_ERR], [
|
|
AC_MSG_CHECKING([whether super_block has s_wb_err])
|
|
ZFS_LINUX_TEST_RESULT([super_block_s_wb_err], [
|
|
AC_MSG_RESULT(yes)
|
|
AC_DEFINE(HAVE_SUPER_BLOCK_S_WB_ERR, 1,
|
|
[have super_block s_wb_err])
|
|
],[
|
|
AC_MSG_RESULT(no)
|
|
])
|
|
])
|