freebsd-dev/sys/cddl
Andriy Gapon 96ed2690df Disable posix_fallocate(2) for ZFS
The generic (naive) implementation of posix_fallocate cannot provide the
standard mandated guarantee that overwrites would never fail due to the lack
of free space.  The fundamental reason is the copy-on-write architecture
of ZFS.  Other features like compression and deduplication can also
increase the size difference between the (pre-)allocated dummy content
and the future content.

So, until ZFS can properly implement the feature it's better to report
that it is unsupported rather than providing an ersatz implementation.
Please note that EINVAL is used to report that the underlying file system
does not support the operation (POSIX.1-2008).

illumos and ZoL seem to do the same.

MFC after:	3 weeks
Sponsored by:	Panzura
2017-11-02 13:49:08 +00:00
..
boot/zfs loader should support large_dnode 2017-09-12 13:45:04 +00:00
compat/opensolaris illumos mutex_init: use SX_NEW instead of bzero 2017-10-09 07:44:09 +00:00
contrib/opensolaris Disable posix_fallocate(2) for ZFS 2017-11-02 13:49:08 +00:00
dev sdt: make all sdt probe sites test one variable 2017-10-22 20:22:23 +00:00