diff options
author | Yeongjin Gil <[email protected]> | 2024-08-19 17:34:30 +0900 |
---|---|---|
committer | Jaegeuk Kim <[email protected]> | 2024-08-21 00:59:00 +0000 |
commit | f785cec298c95d00058560c0715233294a04b8f3 (patch) | |
tree | b8a18d517e880596afc79631e97e25b8e9cb255c /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 43aec4d01bd2ce961817a777b3846f8318f398e4 (diff) |
f2fs: compress: don't redirty sparse cluster during {,de}compress
In f2fs_do_write_data_page, when the data block is NULL_ADDR, it skips
writepage considering that it has been already truncated.
This results in an infinite loop as the PAGECACHE_TAG_TOWRITE tag is not
cleared during the writeback process for a compressed file including
NULL_ADDR in compress_mode=user.
This is the reproduction process:
1. dd if=/dev/zero bs=4096 count=1024 seek=1024 of=testfile
2. f2fs_io compress testfile
3. dd if=/dev/zero bs=4096 count=1 conv=notrunc of=testfile
4. f2fs_io decompress testfile
To prevent the problem, let's check whether the cluster is fully
allocated before redirty its pages.
Fixes: 5fdb322ff2c2 ("f2fs: add F2FS_IOC_DECOMPRESS_FILE and F2FS_IOC_COMPRESS_FILE")
Reviewed-by: Sungjong Seo <[email protected]>
Reviewed-by: Sunmin Jeong <[email protected]>
Tested-by: Jaewook Kim <[email protected]>
Signed-off-by: Yeongjin Gil <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions