-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix fsync absence when fsync=N parameter specified
#1799
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -169,6 +169,8 @@ bool queue_full(const struct thread_data *); | |
| int do_io_u_sync(const struct thread_data *, struct io_u *); | ||
| int do_io_u_trim(struct thread_data *, struct io_u *); | ||
|
|
||
| bool ddir_is_sync(const struct thread_data *); | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I'd personally make that static inline, and require that get_sync_ddir() is called only if should_fsync() is true already. That skips a function call in the hot issue path loop for each IO, even if fsync hasn't been set at all.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As you suggested I could call bool ddir_is_sync(const struct thread_data *td)
{
return should_fsync(td) && get_sync_ddir(td) != DDIR_INVAL;
}But I don't quite get how you want me to make Can you please clarify this?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Scratch that - your point about about not being able to see
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @RomanSofyin I've chatted to @axboe and it should be sufficient to guard the call sites to
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was also thinking if it should be a bit nicer condition being wrapped in a macro or inline function. I mean both components together: |
||
|
|
||
| #ifdef FIO_INC_DEBUG | ||
| static inline void dprint_io_u(struct io_u *io_u, const char *p) | ||
| { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.