mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-27 03:19:35 +03:00
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
18e4f67960
commit
1135d0a5ff
@ -234,6 +234,7 @@ vdev_file_io_strategy(void *arg)
|
|||||||
err = zfs_file_pwrite(vf->vf_file, buf, size, off, &resid);
|
err = zfs_file_pwrite(vf->vf_file, buf, size, off, &resid);
|
||||||
abd_return_buf(zio->io_abd, buf, size);
|
abd_return_buf(zio->io_abd, buf, size);
|
||||||
}
|
}
|
||||||
|
zio->io_error = err;
|
||||||
if (resid != 0 && zio->io_error == 0)
|
if (resid != 0 && zio->io_error == 0)
|
||||||
zio->io_error = ENOSPC;
|
zio->io_error = ENOSPC;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user