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

FIO with fsync option issues more DDIR_SYNC commands than expected #1754

Merged
merged 1 commit into from
Apr 19, 2024

Commits on Apr 19, 2024

  1. FIO with fsync option issues more DDIR_SYNC commands than expected

    Issue and root cause:
    When fsync option is used, the number of flush (or DDIR_SYNC) commands
    issued is more than the expected number of flush commands.
    To elaborate:
    - In the fio config file, consider fsync=1
    1. FIO issues 1 write command
    2. After write completes, FIO sets last_was_sync variable to false
    3. FIO issues 1 flush command
    4. FIO keeps issuing flush commands since last_was_sync is still false
    and this causes more flush commands to be issued than expected
    5. last_was_sync is set to true after the flush command completes
    - The above steps repeats until the workload is completed.
    Fix:
    Instead of setting last_was_sync to true after flush command is completed
    and setting last_was_sync to false after write command is completed,
    set last_was_sync to true after flush command is issued and set
    last_was_sync to false after write command is issued.
    
    Signed-off-by: Celestine Chen celestinechen@google.com
    celestinechen committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    673159e View commit details
    Browse the repository at this point in the history