axboe / fio

Flexible I/O Tester
GNU General Public License v2.0
5.01k stars 1.23k forks source link

ZBD: assertion when check offset valid during reset zone #1725

Closed LinXpy closed 2 months ago

LinXpy commented 4 months ago

Please acknowledge the following before creating a ticket

Description of the bug:

Environment: 5.15.0-53-generic #59~20.04.1-Ubuntu SMP Thu Oct 20 15:10:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

fio version: fio-3.36 and old versions

Reproduction steps

LinXpy commented 4 months ago

The root cause is that the "f->file_offset" and "f->io_size" was ever adjusted in function "zbd_zone_align_file_sizes" of zbd.c, however during libfio.c ~ clear_io_state(), when it get the file offset through "get_start_offset()", the returned offset value is still the original one instead of the adjusted value in zbd.c, which caused the assertion.

axboe commented 4 months ago

Since you already root caused the problem, why not just send a patch or PR to fix it?

LinXpy commented 4 months ago

Since you already root caused the problem, why not just send a patch or PR to fix it?

I'm not sure about the detailed procedure for requesting PR to fio repo, is there any guidance doc? Thanks.

vincentkfu commented 4 months ago

Here is a guide that seems reasonable: https://opensource.com/article/19/7/create-pull-request-github

LinXpy commented 4 months ago

@vincentkfu thanks for the guide link, i followed it and requested a PR: https://github.com/axboe/fio/pull/1728 for the fix.