[f2fs-dev] [PATCH v2 1/3] f2fs: intorduce f2fs_all_cluster_page_ready

2022-05-07 Thread Fengnan Chang via Linux-f2fs-devel
When write total cluster, all pages is uptodate, there is not need to call f2fs_prepare_compress_overwrite, intorduce f2fs_all_cluster_page_ready to avoid this. Signed-off-by: Fengnan Chang --- fs/f2fs/compress.c | 11 --- fs/f2fs/data.c | 9 +++-- fs/f2fs/f2fs.h | 4 ++--

[f2fs-dev] [PATCH v2 2/3] f2fs: use onstack pages instead of pvec

2022-05-07 Thread Fengnan Chang via Linux-f2fs-devel
Since pvec have 15 pages, it not a multiple of 4, when write compressed pages, write in 64K as a unit, it will call pagevec_lookup_range_tag agagin, sometimes this will take a lot of time. Use onstack pages instead of pvec to mitigate this problem. Signed-off-by: Fengnan Chang --- fs/f2fs/compre

[f2fs-dev] [PATCH v2 3/3] f2fs: support compressed file write/read amplifiction

2022-05-07 Thread Fengnan Chang via Linux-f2fs-devel
Try to support compressed file write and amplifiction accounting. Signed-off-by: Fengnan Chang --- fs/f2fs/data.c | 19 +++ fs/f2fs/debug.c | 7 +-- fs/f2fs/f2fs.h | 34 ++ 3 files changed, 54 insertions(+), 6 deletions(-) diff --git a/fs/f

[f2fs-dev] [PATCH v2 0/3] support compressed file write/read amplifiction

2022-05-07 Thread Fengnan Chang via Linux-f2fs-devel
Optimise f2fs_write_cache_pages, and support compressed file write/read amplifiction accounting. Fengnan Chang (3): f2fs: intorduce f2fs_all_cluster_page_ready f2fs: use onstack pages instead of pvec f2fs: support compressed file write/read amplifiction fs/f2fs/compress.c | 15 ++--