Re: [f2fs-dev] [PATCH v2 2/2] f2fs: support POSIX_FADV_DONTNEED drop compressed page cache

2021-11-26 Thread Chao Yu
On 2021/11/26 18:19, Fengnan Chang wrote: Previously, compressed page cache drop when clean page cache, but POSIX_FADV_DONTNEED can't clean compressed page cache because raw page don't have private data, and won't call f2fs_invalidate_compress_pages. This commit call f2fs_invalidate_compress_page

Re: [f2fs-dev] [PATCH v2 1/2] f2fs: fix remove page failed in invalidate compress pages

2021-11-26 Thread Chao Yu
On 2021/11/26 18:19, Fengnan Chang wrote: Since compress inode not a regular file, generic_error_remove_page in f2fs_invalidate_compress_pages will always be failed, set compress inode as a regular file to fix it. Fixes: 6ce19aff0b8c ("f2fs: compress: add compress_inode to cache compressed block

[f2fs-dev] [PATCH v2 1/2] f2fs: fix remove page failed in invalidate compress pages

2021-11-26 Thread Fengnan Chang
Since compress inode not a regular file, generic_error_remove_page in f2fs_invalidate_compress_pages will always be failed, set compress inode as a regular file to fix it. Fixes: 6ce19aff0b8c ("f2fs: compress: add compress_inode to cache compressed blocks") Signed-off-by: Fengnan Chang --- fs/f2

[f2fs-dev] [PATCH v2 2/2] f2fs: support POSIX_FADV_DONTNEED drop compressed page cache

2021-11-26 Thread Fengnan Chang
Previously, compressed page cache drop when clean page cache, but POSIX_FADV_DONTNEED can't clean compressed page cache because raw page don't have private data, and won't call f2fs_invalidate_compress_pages. This commit call f2fs_invalidate_compress_pages() directly in f2fs_file_fadvise() for POSI