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 <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes #12904
  • Loading branch information
nabijaczleweli authored Dec 23, 2021
1 parent 18e4f67 commit 1135d0a
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 1135d0a

Please sign in to comment.