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

Fix fsync absence when fsync=N parameter specified #1799

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

RomanSofyin
Copy link

When fsync=N parameter specified and the final IO block issued happens to be Nth the fsync should follow it is missed. This update checks if it needs to loop again in do_io to issue that final fsync when all the IO work is done.

Signed-off-by: Roman Sofin [email protected]

backend.c Show resolved Hide resolved
backend.c Show resolved Hide resolved
fio.h Show resolved Hide resolved
io_u.c Outdated Show resolved Hide resolved
io_u.c Outdated Show resolved Hide resolved
io_u.c Show resolved Hide resolved
io_u.c Outdated Show resolved Hide resolved
Copy link
Author

@RomanSofyin RomanSofyin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed the issues.

fio.h Show resolved Hide resolved
@RomanSofyin RomanSofyin requested a review from axboe August 7, 2024 17:36
@axboe
Copy link
Owner

axboe commented Aug 7, 2024

Addressed the issues.

Please squash the two commits into one, we should not have fix-up commits in the history. Once you do, I'll take a look again.

@RomanSofyin RomanSofyin force-pushed the r.sofin/fsync-fixup branch from b1c0bb5 to 2b11473 Compare August 8, 2024 07:45
@RomanSofyin
Copy link
Author

Hi @axboe, can you look at this again?

@axboe
Copy link
Owner

axboe commented Aug 12, 2024

You still have the should_fsync() change in there. If you want to have it take a const td, then please do a prep patch with just that. Like I said initially, it's not related to your fix at all outside of you adding a new caller that needs it done. That's by definition a prep patch, should not be included with a fix.

@RomanSofyin
Copy link
Author

I created PR #1805 which I guess we merge first, then I update the current one in case there will be a conflict.

@axboe
Copy link
Owner

axboe commented Aug 13, 2024

Since the change depends on the other one, please just have both commits in a single pr.

Roman Sofin added 2 commits August 13, 2024 16:30
Make `should_fsync()` safer by using a pointer to a constant
thread_data structure instance.

Signed-off-by: Roman Sofin [email protected]
When `fsync=N` parameter specified and the final IO block issued
happens to be Nth an fsync should follow it is missed.
This update checks if it needs to loop again in `do_io` to issue
that final fsync when all the IO work is done.

Signed-off-by: Roman Sofin [email protected]
@RomanSofyin
Copy link
Author

Should be fine now. If so, I'll close #1805.

@RomanSofyin
Copy link
Author

@axboe does this look fine?

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

Successfully merging this pull request may close these issues.

2 participants