]> www.infradead.org Git - users/hch/xfstests-dev.git/commit
generic: Add integrity tests with synchronous directio
authorRitesh Harjani (IBM) <ritesh.list@gmail.com>
Mon, 20 Nov 2023 11:19:34 +0000 (16:49 +0530)
committerZorro Lang <zlang@kernel.org>
Sun, 10 Dec 2023 13:38:00 +0000 (21:38 +0800)
commitf814a0d8b89c84055b4351f8b9655c5868db08ba
tree47c908312e84cb7165f0b8cac8e0ccf5adff118a
parent985df7ef3051cf4172b5e6fdca0350e530eb6045
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
hardware

Reported-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Signed-off-by: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/generic/737 [new file with mode: 0755]
tests/generic/737.out [new file with mode: 0644]