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 <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Ryan Moeller <ryan@ixsystems.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12904
This commit is contained in:
parent
14bf91a043
commit
5d8c081193
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue