mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-27 03:19:35 +03:00
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 <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 #12446
This commit is contained in:
parent
7eebcd2be6
commit
46b2623586
@ -1100,6 +1100,10 @@ vdev_geom_check_unmapped(zio_t *zio, struct g_consumer *cp)
|
|||||||
{
|
{
|
||||||
struct vdev_geom_check_unmapped_cb_state s;
|
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 the buffer is already linear, then nothing to do here. */
|
||||||
if (abd_is_linear(zio->io_abd))
|
if (abd_is_linear(zio->io_abd))
|
||||||
return (0);
|
return (0);
|
||||||
|
Loading…
Reference in New Issue
Block a user