diff options
author | наб <[email protected]> | 2021-12-23 20:39:29 +0100 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2022-02-03 15:28:01 -0800 |
commit | 5d8c081193d4fdfdd58a0edf4dc87aa18f75ed33 (patch) | |
tree | 6338ae5cefd0b76ad240d46f5babbf6da56a513d | |
parent | 14bf91a0431e6b410ec9cf029172dfc5a99eb58f (diff) |
FreeBSD: fix unpropagated error
When performing I/O on FreeBSD using a file based vdev ensure all
errors encountered when reading/writing are propagated through the
zio pipeline.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes #12904
-rw-r--r-- | module/os/freebsd/zfs/vdev_file.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/module/os/freebsd/zfs/vdev_file.c b/module/os/freebsd/zfs/vdev_file.c index fc04a7476..742ac9786 100644 --- a/module/os/freebsd/zfs/vdev_file.c +++ b/module/os/freebsd/zfs/vdev_file.c @@ -234,6 +234,7 @@ vdev_file_io_strategy(void *arg) err = zfs_file_pwrite(vf->vf_file, buf, size, off, &resid); abd_return_buf(zio->io_abd, buf, size); } + zio->io_error = err; if (resid != 0 && zio->io_error == 0) zio->io_error = ENOSPC; |