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.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #16629
This commit is contained in:
Brian Behlendorf 2024-10-12 13:51:35 -07:00 committed by GitHub
parent 48dfe39747
commit c642e985e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
/*