io_u: Ensure fsync only after write(s)
authorMinwoo Im <minwoo.im.dev@gmail.com>
Tue, 9 Jul 2024 22:50:14 +0000 (07:50 +0900)
committerMinwoo Im <minwoo.im@samsung.com>
Thu, 11 Jul 2024 07:58:46 +0000 (16:58 +0900)
commit704a8cfef1d0a61c8935a5c6047fba148a766dab
treed9fc2e111c50bf9cd8d943c7909efec21e2bb109
parente11046bfb64bb82ac928013fe41cd022f6d529db
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>
io_u.c