From bc06d8164b8b6673ca2dc9b36090f91a5d6348b3 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 13 Jan 2025 13:38:54 -0800 Subject: [PATCH] Linux: Enable Direct IO by default Aligns the 2.3 release branch with the well tested default behavior in the master branch. Signed-off-by: Brian Behlendorf --- module/zfs/zfs_vnops.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c index 8c8ed255e..b789d1ed5 100644 --- a/module/zfs/zfs_vnops.c +++ b/module/zfs/zfs_vnops.c @@ -77,8 +77,15 @@ int zfs_bclone_wait_dirty = 0; * Enable Direct I/O. If this setting is 0, then all I/O requests will be * directed through the ARC acting as though the dataset property direct was * set to disabled. + * + * Disabled by default on FreeBSD until a potential range locking issue in + * zfs_getpages() can be resolved. */ +#ifdef __FreeBSD__ static int zfs_dio_enabled = 0; +#else +static int zfs_dio_enabled = 1; +#endif /*