Repository navigation
backend.c: fix async ioengine prep/queue direction mismatch in experimental_verify - #2007
Conversation
|
To the commit message please add |
|
Quickly scanning through the The only problem I found is with the |
7a387f8 to
d50f967
Compare
|
This looks like a far more elegant solution than the one I was suggesting. The logs will be a little confusing because you'll see multiple preps of the same I/O but it keeps all the extra checks and work out of the main I/O path which is a win. My only note is: @yehormalikov that it looks like your committer address and author address are different - is this intentional? |
…mental verify When using --experimental_verify=1 with async ioengines like libaio, there was a critical mismatch between the I/O direction set during prep and the direction used when queuing operations. The issue occurred because get_io_u() calls td_io_prep() which configures ioengine structures (like iocb) for WRITE operations, but then io_u->ddir is changed from WRITE to READ for verification after prep completes. This left the iocb configured for writes while fio's accounting expected reads, causing incorrect I/O statistics and potential data integrity issues. Fix by calling td_io_prep() again after changing the data direction in both TRIM and WRITE cases, ensuring async ioengines re-sync their internal structures with the final I/O direction. Fixes: axboe#1955 Signed-off-by: Yehor Malikov <Yehor.Malikov@solidigmtechnology.com>
d50f967 to
1492830
Compare
Thank you for attention. Have already changed committer address |
When using --experimental_verify=1 with async ioengines like libaio, there was a critical mismatch between the I/O direction set during prep and the direction used when queuing operations.
The issue occurred because get_io_u() calls td_io_prep() which configures ioengine structures (like iocb) for WRITE operations, but then io_u->ddir is changed from WRITE to READ for verification after prep completes. This left the iocb configured for writes while fio's accounting expected reads, causing incorrect I/O statistics and potential data integrity issues.
Fix by calling td_io_prep() again after changing the data direction in both TRIM and WRITE cases, ensuring async ioengines re-sync their internal structures with the final I/O direction.
Fixes #1955