mirror_zfs/module
Mark Johnston 063daa8350
Fix handling of errors from dmu_write_uio_dbuf() on FreeBSD
FreeBSD's implementation of zfs_uio_fault_move() returns EFAULT when a
page fault occurs while copying data in or out of user buffers.  The VFS
treats such errors specially and will retry the I/O operation (which may
have made some partial progress).

When the FreeBSD and Linux implementations of zfs_write() were merged,
the handling of errors from dmu_write_uio_dbuf() changed such that
EFAULT is not handled as a partial write.  For example, when appending
to a file, the z_size field of the znode is not updated after a partial
write resulting in EFAULT.

Restore the old handling of errors from dmu_write_uio_dbuf() to fix
this.  This should have no impact on Linux, which has special handling
for EFAULT already.

Reviewed-by: Andriy Gapon <avg@FreeBSD.org>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Closes #12964
2022-01-21 11:54:05 -08:00
..
avl module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
icp module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
lua Use fallthrough macro 2021-09-14 10:17:54 -06:00
nvpair module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
os Introduce a flag to skip comparing the local mac when raw sending 2022-01-21 11:41:17 -08:00
spl Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
unicode module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
zcommon module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
zfs Fix handling of errors from dmu_write_uio_dbuf() on FreeBSD 2022-01-21 11:54:05 -08:00
zstd Linux 5.16: Resolve ZSTD_isError symbol collision in Linux kernel 2021-12-07 12:28:22 -08:00
.gitignore Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
Kbuild.in Add zstd support to zfs 2020-08-20 10:30:06 -07:00
Makefile.bsd Updated the lz4 decompressor 2022-01-07 10:36:49 -08:00
Makefile.in module: Makefile: flatten subdir loop, use $PWD instead of pwd 2022-01-06 14:29:41 -08:00