Skip to content

Commit

Permalink
FreeBSD: fix unpropagated error
Browse files Browse the repository at this point in the history
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 openzfs#12904
  • Loading branch information
nabijaczleweli authored and Ryan Moeller committed Jan 18, 2022
1 parent daabefa commit fd6af65
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions module/os/freebsd/zfs/vdev_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit fd6af65

Please sign in to comment.