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

writefua and readfua may not work with the engine of io_uring #1834

Closed
18888024924 opened this issue Oct 29, 2024 · 4 comments
Closed

writefua and readfua may not work with the engine of io_uring #1834

18888024924 opened this issue Oct 29, 2024 · 4 comments

Comments

@18888024924
Copy link

Please acknowledge the following before creating a ticket

Description of the bug:
<
Dear engineer
when I use run the command as below, the parameter that writefua and readfua seem not work. There is no fuaflag 0x4000 sent to NVMe SSD . I have some trobule with the usage of fio‘s fua fuction。
fio3.37 --ioengine=io_uring --thread --size=100% --direct=1 --group_reporting --name=test --numjobs=1 --bs=4k --iodepth=1 --writefua=1 --readfua=1 --filename=/dev/nvme0n1 --rw=randwrite --time_based --do_verify=1 -verify_dump=1 --verify_backlog=1 --runtime=21600 --output=a.txt>

Environment: <ubuntu22.04>

fio version: <fio3.37>

Reproduction steps
<fio3.37 --ioengine=io_uring --thread --size=100% --direct=1 --group_reporting --name=test --numjobs=1 --bs=4k --iodepth=1 --writefua=1 --readfua=1 --filename=/dev/nvme0n1 --rw=randwrite --time_based --do_verify=1 -verify_dump=1 --verify_backlog=1 --runtime=21600 --output=a.txt>

@sitsofe
Copy link
Collaborator

sitsofe commented Oct 29, 2024

The readfua and writefua options are documented as being engine specific parameters for the the sg ioengine. Notice how the commands you are referencing are in the I/O engine specific parameters section and the ioengines that support a given command are inside the square brackets. As such, it is not a bug that they don't work with the io_uring engine.

@18888024924
Copy link
Author

Dear engineer
what I am referring to is 1761 Compile Fio using Master's package
It is mentioned here that 'write fua' and 'read fua' were added to the io_uring.
My understanding is that the fua_flag of 0x4000 will be passed in the nvme_read and nvme_write command's cdw12.
In fact, when writefua and readfua are set to 1, fua_flag passed down is 0.
So I'm a bit confused, not sure if this feature has not been fully implemented yet.

@axboe
Copy link
Owner

axboe commented Oct 29, 2024

You need to use passthrough with io_uring for that, it won't work with normal file system access. Fio should probably warn about that...

@vincentkfu
Copy link
Collaborator

You will also need to use fio 3.38 for those options.

@axboe axboe closed this as completed Oct 31, 2024
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

4 participants