Please sign in to comment.
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 <firstname.lastname@example.org> Reviewed-by: Richard Yao <email@example.com> Signed-off-by: Brian Behlendorf <firstname.lastname@example.org> Issue #7927 Closes #7122 Closes #7937
- Loading branch information...
Showing with 64 additions and 5 deletions.
|@@ -0,0 +1,20 @@|
|dnl # 4.5 API change|
|dnl # Added in_compat_syscall() which can be overridden on a per-|
|dnl # architecture basis. Prior to this is_compat_task() was the|
|dnl # provided interface.|
|AC_MSG_CHECKING([whether in_compat_syscall() is available])|
|[in_compat_syscall() is available])|