-
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.
When handling a 32-bit statfs() system call the returned fields, though 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 when needed to fit in a 32-bit unsigned long. Unlike most other filesystems the total possible files count is more likely to overflow because it is 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() reporting, internally to ZFS the limits remain unchanged. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
- Loading branch information
1 parent
145c88f
commit c3adb47
Showing
3 changed files
with
39 additions
and
5 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
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