io_u: Support fsync for --rw=trimwrite
authorMinwoo Im <minwoo.im.dev@gmail.com>
Sat, 22 Jun 2024 15:30:03 +0000 (00:30 +0900)
committerMinwoo Im <minwoo.im@samsung.com>
Thu, 11 Jul 2024 07:58:46 +0000 (16:58 +0900)
commitcf168c5be90cc7c74114d61d2c01fa39a3cb52c7
tree34847e942a9fcc6fa5127343485d87855e9b3938
parent704a8cfef1d0a61c8935a5c6047fba148a766dab
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>
io_u.c