diff options
author | Mark Johnston <[email protected]> | 2021-08-02 15:18:24 -0400 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2021-09-14 14:29:46 -0700 |
commit | 451d6da98838a570a9a1b8607c02802462999c28 (patch) | |
tree | e5ebff8a869a57603929b07543734e26a16cb647 | |
parent | e298ac5d04c96c7351b1314922be6ea443301b98 (diff) |
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
-rw-r--r-- | module/os/freebsd/zfs/vdev_geom.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/module/os/freebsd/zfs/vdev_geom.c b/module/os/freebsd/zfs/vdev_geom.c index 6ac37da1c..4ffa21495 100644 --- a/module/os/freebsd/zfs/vdev_geom.c +++ b/module/os/freebsd/zfs/vdev_geom.c @@ -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); |