Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable DIO #108

Open
IridiumXOR opened this issue Mar 31, 2023 · 1 comment
Open

Enable DIO #108

IridiumXOR opened this issue Mar 31, 2023 · 1 comment

Comments

@IridiumXOR
Copy link

How is it possible to enable direct I/O?
Obviously, I enable the flag dio=1 when I load the module however, if I check using a debug build the module always returns Direct IO Disabled. I have used a USB3 drive on a real machine but I have also tested the option on a QEMU virtual machine with SCSI, SATA and USB virtual disks with ext4 and xfs but no results (also mounting partitions with sync option).
Can you explain how to use this feature?

@IridiumXOR
Copy link
Author

IridiumXOR commented Apr 6, 2023

I have investigated a little bit and seems that starting from kernel 4.14 (when vfs_write was replaced by kernel_write) DIO is not usable anymore, because kernel_write always returns -EFAULT if used with O_DIRECT (it is hardcoded in the code)

EDIT: I have discovered that this behavior is specific of EXT4 if you use a VFAT partition DIO works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant