mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
ed8463509b
A simply reproducer from Frank Sorenson:
ftruncate(fd, 65012224)
io_prep_pwrite(iocbs[0], fd, buf[0], 1048576, 63963648);
io_prep_pwrite(iocbs[1], fd, buf[1], 1048576, 65012224);
io_submit(io_ctx, 1, &iocbs[0]);
io_submit(io_ctx, 1, &iocbs[1]);
io_getevents(io_ctx, 2, 2, events, NULL)
help to find an ext4 corruption:
**************** **************** ****************
* page 1 * * page 2 * * page 3 *
**************** **************** ****************
existing 0000000000000000 0000000000000000 0000000000000000
write 1 AAAAAAAAAAAAAA AA
write 2 BBBBBBBBBBBBBB BB
result 00AAAAAAAAAAAAAA 00BBBBBBBBBBBBBB BB00000000000000
desired 00AAAAAAAAAAAAAA AABBBBBBBBBBBBBB BB00000000000000
This issue remind us we might miss unaligned AIO test for long time.
We thought fsx cover this part, but looks like it's not. So this case
trys to cover unaligned direct AIO write test on file with different
initial truncate i_size.
The following patches fix the issue on xfs and ext4.
xfs: serialize unaligned dio writes against all other dio writes
ext4: Fix data corruption caused by unaligned direct AIO
Signed-off-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
3 lines
43 B
Plaintext
3 lines
43 B
Plaintext
QA output created by 538
|
|
Silence is golden
|