Skip to content

Commit

Permalink
Allow disabling of unmapped I/O on FreeBSD
Browse files Browse the repository at this point in the history
We have a tunable which permits one to disable the use of unmapped I/O
for the buffer cache.  Respect it in ZFS as well.  This is useful for
KMSAN, which cannot easily maintain shadow state for unmapped pages.

No functional change intended, as unmapped I/O is permitted by default
and there's no real reason to disable it in practice except for
debugging.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Closes openzfs#12446
  • Loading branch information
markjdb authored and tonyhutter committed Sep 14, 2021
1 parent e298ac5 commit 451d6da
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions module/os/freebsd/zfs/vdev_geom.c
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,10 @@ vdev_geom_check_unmapped(zio_t *zio, struct g_consumer *cp)
{
struct vdev_geom_check_unmapped_cb_state s;

/* If unmapped I/O is administratively disabled, respect that. */
if (!unmapped_buf_allowed)
return (0);

/* If the buffer is already linear, then nothing to do here. */
if (abd_is_linear(zio->io_abd))
return (0);
Expand Down

0 comments on commit 451d6da

Please sign in to comment.