summaryrefslogtreecommitdiffstats
path: root/config/kernel.m4
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2018-09-24 17:11:25 -0700
committerGitHub <[email protected]>2018-09-24 17:11:25 -0700
commite897a23eb13bafcf9c38d2fc37ae57a7729d9a02 (patch)
treec0370c4ecee2e54a40a5e4a273bee72ecdca8220 /config/kernel.m4
parent36e369ecb847570d6939073663c4e95406223c7f (diff)
Fix statfs(2) for 32-bit user space
When handling a 32-bit statfs() system call the returned fields, although 64-bit in the kernel, must be limited to 32-bits or an EOVERFLOW error will be returned. This is less of an issue for block counts since the default reported block size in 128KiB. But since it is possible to set a smaller block size, these values will be scaled as needed to fit in a 32-bit unsigned long. Unlike most other filesystems the total possible file counts are more likely to overflow because they are calculated based on the available free space in the pool. In order to prevent this the reported value must be capped at 2^32-1. This is only for statfs(2) reporting, there are no changes to the internal ZFS limits. Reviewed-by: Andreas Dilger <[email protected]> Reviewed-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue #7927 Closes #7122 Closes #7937
Diffstat (limited to 'config/kernel.m4')
-rw-r--r--config/kernel.m41
1 files changed, 1 insertions, 0 deletions
diff --git a/config/kernel.m4 b/config/kernel.m4
index 7b92c4744..118f1d8dc 100644
--- a/config/kernel.m4
+++ b/config/kernel.m4
@@ -160,6 +160,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
ZFS_AC_KERNEL_GLOBAL_PAGE_STATE
ZFS_AC_KERNEL_ACL_HAS_REFCOUNT
ZFS_AC_KERNEL_USERNS_CAPABILITIES
+ ZFS_AC_KERNEL_IN_COMPAT_SYSCALL
AS_IF([test "$LINUX_OBJ" != "$LINUX"], [
KERNEL_MAKE="$KERNEL_MAKE O=$LINUX_OBJ"