generic: Add integrity tests with synchronous directio

This test covers data & metadata integrity check with directio with
o_sync flag and checks the file contents & size after sudden fileystem
shutdown once the directio write is completed. ext4 directio after iomap
conversion was broken in the sense that if the FS crashes after
synchronous directio write, it's file size is not properly updated.
This test adds a testcase to cover such scenario.

Man page of open says that -
O_SYNC provides synchronized I/O file integrity completion, meaning write
operations will flush data and all associated metadata to the underlying

Reported-by: Gao Xiang <>
Signed-off-by: "Ritesh Harjani (IBM)" <>
Reviewed-by: Zorro Lang <>
Signed-off-by: Zorro Lang <>
2 files changed