Skip to content

Commit 46b2623

Browse files
authored
Allow disabling of unmapped I/O on FreeBSD
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 <[email protected]> Reviewed-by: Tony Nguyen <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Mark Johnston <[email protected]> Closes #12446
1 parent 7eebcd2 commit 46b2623

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

module/os/freebsd/zfs/vdev_geom.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,6 +1100,10 @@ vdev_geom_check_unmapped(zio_t *zio, struct g_consumer *cp)
11001100
{
11011101
struct vdev_geom_check_unmapped_cb_state s;
11021102

1103+
/* If unmapped I/O is administratively disabled, respect that. */
1104+
if (!unmapped_buf_allowed)
1105+
return (0);
1106+
11031107
/* If the buffer is already linear, then nothing to do here. */
11041108
if (abd_is_linear(zio->io_abd))
11051109
return (0);

0 commit comments

Comments
 (0)