Limit max file size based on PAGE_SIZE.  Even though ffs can handle files up to 16TB, we do limit the max file to 2^31 pages to prevent overflow of a 32-bit unsigned int.  The buffer cache has its own checks but a little added paranoia never hurts.  Adapted from a patch in FreeBSD.
Limit max file size based on PAGE_SIZE.  Even though ffs can handle
files up to 16TB, we do limit the max file to 2^31 pages to prevent
overflow of a 32-bit unsigned int.  The buffer cache has its own
checks but a little added paranoia never hurts.  Adapted from a patch
in FreeBSD.

orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars