From f674558f423badaaaeedba27f4b62c3e078d733e Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 9 Oct 2024 12:29:13 -0700 Subject: [PATCH] Revert "Temporarily disable Direct IO by default" This partially reverts commit 41210597. Now that b4e4cbeb2 has been merged Direct IO can be enabled by default for Linux, but for FreeBSD there still remains a potentially insufficient range locking in zfs_getpages() which needs to be resolved. 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 d5e0d2a2b35a..0799f17758bf 100644 --- a/module/zfs/zfs_vnops.c +++ b/module/zfs/zfs_vnops.c @@ -77,8 +77,15 @@ static 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 /*