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

Flush enhancements and fixes #1777

Merged
merged 6 commits into from
Jul 11, 2024
Merged

Commits on Jul 9, 2024

  1. io_uring: Add support FLUSH command

    Add support for --fsync and --fdatasync in io_uring_cmd ioengine to
    enable FLUSH commands just like libaio or io_uring ioengines.
    
    If --fsync or --fdatasync is given N, FLUSH command will be issued as
    per N write commands.
    
    Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
    minwooim committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    7116c1f View commit details
    Browse the repository at this point in the history
  2. td: Rename last_ddir to last_ddir_completed

    `last_ddir` represents the data direction of the latest completed
    command.  To avoid confusions, this patch renamed `last_ddir` to
    `last_ddir_completed` to make it much more clear.
    
    Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
    minwooim committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    87b1002 View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2024

  1. td: Replace last_was_sync with last_ddir_issued

    `last_was_sync` has represented that the last command had DDIR_SYNC.
    This can be replaced with `ddir_sync(last_ddir_issued)` and it's much
    more flexible to represent the last issued command's data direction.
    
    Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
    minwooim committed Jul 11, 2024
    Configuration menu
    Copy the full SHA
    e11046b View commit details
    Browse the repository at this point in the history
  2. io_u: Ensure fsync only after write(s)

    When using `--rw=write --fsync=N`, the FLUSH command is correctly
    issued after N WRITE commands. However, if READ commands are mixed
    in with --rw, fsync occurs after READ commands as well. This patch
    ensures that fsync is only triggered after the specified number of
    WRITE commands, regardless of READ commands.
    
    Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
    minwooim committed Jul 11, 2024
    Configuration menu
    Copy the full SHA
    704a8cf View commit details
    Browse the repository at this point in the history
  3. io_u: Support fsync for --rw=trimwrite

    Even if ddir is determined in get_rw_ddir(), ddir might be updated in
    set_rw_ddir().  if td represents trimwrite, it will be updated to either
    DDIR_TRIM or DDIR_WRITE even ddir already represents for DDIR_SYNC.
    
    To support DDIR_SYNC(fsync) for trimwrite, this patch checks ddir_sync()
    in case of trimwrite not to update the pre-determined ddir.
    
    Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
    minwooim committed Jul 11, 2024
    Configuration menu
    Copy the full SHA
    cf168c5 View commit details
    Browse the repository at this point in the history
  4. t/nvmept.py: Add test cases for FLUSH

    This test script tests number of FLUSH commands triggered by --fsync=<N>
    options to make FLUSH commands are followed by the WRITE commands from
    the various --rw I/O workload.
    
    Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
    minwooim committed Jul 11, 2024
    Configuration menu
    Copy the full SHA
    e84adcf View commit details
    Browse the repository at this point in the history