diff options
| author | Jimmy Zuber <jamz@amazon.com> | 2026-07-31 20:38:42 +0000 |
|---|---|---|
| committer | Miklos Szeredi <mszeredi@redhat.com> | 2026-08-24 12:18:02 +0200 |
| commit | 60dbcce1567f6502215b36ba4066e8fd1f86d706 (patch) | |
| tree | 6619eb730431dc6d8622537fc80fc7bbef0dbd31 /include/linux/debugobjects.h | |
| parent | d1dbc59200b54944f00251ca4dfbb2b318beca13 (diff) | |
selftests/fuse: test post-EOF page zeroing when a file is extended
Add a regression test for the bug where extending a file left the tail of
the old partial EOF page exposing stale mmap-dirtied data instead of zeros.
The test is a self-contained raw /dev/fuse server (no libfuse dependency)
that runs without writeback_cache and returns FOPEN_KEEP_CACHE, the
configuration in which the bug is visible. Its backing data is always zero
in the hole, so any non-zero byte a read sees is stale page-cache data.
All offsets are relative to the runtime page size. Four cases:
- write_extend: pollute the post-EOF tail, extend past it by writing into
a later page, and verify the tail reads back as zero;
- ftruncate_extend: same, but extend via ftruncate();
- fallocate_extend: same, but extend via fallocate() at the old EOF;
- extend_into_eof_page_preserves_data: an extending write landing inside
the old EOF page must not be clobbered by the zeroing.
Each case fails without the fix and passes with it.
Signed-off-by: Jimmy Zuber <jamz@amazon.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
