Re: [f2fs-dev] [PATCH -next 00/14] btrfs: Cleaned up folio->page conversion

2024-08-28 Thread Li Zetao via Linux-f2fs-devel
在 2024/8/26 22:08, Josef Bacik 写道: On Fri, Aug 23, 2024 at 05:15:22PM -0400, Josef Bacik wrote: On Fri, Aug 23, 2024 at 03:50:51PM -0400, Josef Bacik wrote: On Thu, Aug 22, 2024 at 09:37:00AM +0800, Li Zetao wrote: Hi all, In btrfs, because there are some interfaces that do not use folio, t

[f2fs-dev] [PATCH 04/14] btrfs: convert try_release_extent_buffer() to take a folio

2024-08-21 Thread Li Zetao via Linux-f2fs-devel
The old page API is being gradually replaced and converted to use folio to improve code readability and avoid repeated conversion between page and folio. Signed-off-by: Li Zetao --- fs/btrfs/disk-io.c | 2 +- fs/btrfs/extent_io.c | 15 +++ fs/btrfs/extent_io.h | 2 +- 3 files cha

[f2fs-dev] [PATCH 01/14] btrfs: convert clear_page_extent_mapped() to take a folio

2024-08-21 Thread Li Zetao via Linux-f2fs-devel
The old page API is being gradually replaced and converted to use folio to improve code readability and avoid repeated conversion between page and folio. Signed-off-by: Li Zetao --- fs/btrfs/extent_io.c | 9 - fs/btrfs/extent_io.h | 2 +- fs/btrfs/inode.c | 4 ++-- 3 files changed, 7

[f2fs-dev] [PATCH 13/14] btrfs: convert btrfs_decompress() to take a folio

2024-08-21 Thread Li Zetao via Linux-f2fs-devel
The old page API is being gradually replaced and converted to use folio to improve code readability and avoid repeated conversion between page and folio. Based on the previous patch, the compression path can be directly used in folio without converting to page. Signed-off-by: Li Zetao --- fs/btr

[f2fs-dev] [PATCH 05/14] btrfs: convert read_key_bytes() to take a folio

2024-08-21 Thread Li Zetao via Linux-f2fs-devel
The old page API is being gradually replaced and converted to use folio to improve code readability and avoid repeated conversion between page and folio. Moreover, use kmap_local_folio() instend of kmap_local_page(), which is more consistent with folio usage. Signed-off-by: Li Zetao --- fs/btrfs

[f2fs-dev] [PATCH 14/14] btrfs: convert copy_inline_to_page() to use folio

2024-08-21 Thread Li Zetao via Linux-f2fs-devel
The old page API is being gradually replaced and converted to use folio to improve code readability and avoid repeated conversion between page and folio. Moreover find_or_create_page() is compatible API, and it can replaced with __filemap_get_folio(). Some interfaces have been converted to use foli

[f2fs-dev] [PATCH 02/14] btrfs: convert get_next_extent_buffer() to take a folio

2024-08-21 Thread Li Zetao via Linux-f2fs-devel
The old page API is being gradually replaced and converted to use folio to improve code readability and avoid repeated conversion between page and folio. And use folio_pos instend of page_offset, which is more consistent with folio usage. Signed-off-by: Li Zetao --- fs/btrfs/extent_io.c | 14 +++

[f2fs-dev] [PATCH 10/14] btrfs: convert zlib_decompress() to take a folio

2024-08-21 Thread Li Zetao via Linux-f2fs-devel
The old page API is being gradually replaced and converted to use folio to improve code readability and avoid repeated conversion between page and folio. And memcpy_to_page() can be replaced with memcpy_to_folio(). But there is no memzero_folio(), but it can be replaced equivalently by folio_zero_r

[f2fs-dev] [PATCH 03/14] btrfs: convert try_release_subpage_extent_buffer() to take a folio

2024-08-21 Thread Li Zetao via Linux-f2fs-devel
The old page API is being gradually replaced and converted to use folio to improve code readability and avoid repeated conversion between page and folio. And use folio_pos instend of page_offset, which is more consistent with folio usage. At the same time, folio_test_private can handle folio direct

[f2fs-dev] [PATCH 09/14] btrfs: convert try_release_extent_mapping() to take a folio

2024-08-21 Thread Li Zetao via Linux-f2fs-devel
The old page API is being gradually replaced and converted to use folio to improve code readability and avoid repeated conversion between page and folio. And page_to_inode() can be replaced with folio_to_inode() now. Signed-off-by: Li Zetao --- fs/btrfs/extent_io.c | 6 +++--- fs/btrfs/extent_io

[f2fs-dev] [PATCH 11/14] btrfs: convert lzo_decompress() to take a folio

2024-08-21 Thread Li Zetao via Linux-f2fs-devel
The old page API is being gradually replaced and converted to use folio to improve code readability and avoid repeated conversion between page and folio. And memcpy_to_page() can be replaced with memcpy_to_folio(). But there is no memzero_folio(), but it can be replaced equivalently by folio_zero_r

[f2fs-dev] [PATCH -next 00/14] btrfs: Cleaned up folio->page conversion

2024-08-21 Thread Li Zetao via Linux-f2fs-devel
Hi all, In btrfs, because there are some interfaces that do not use folio, there is page-folio-page mutual conversion. This patch set should clean up folio-page conversion as much as possible and use folio directly to reduce invalid conversions. This patch set starts with the rectification of fun

[f2fs-dev] [PATCH 06/14] btrfs: convert submit_eb_subpage() to take a folio

2024-08-21 Thread Li Zetao via Linux-f2fs-devel
The old page API is being gradually replaced and converted to use folio to improve code readability and avoid repeated conversion between page and folio. Moreover, use folio_pos() instend of page_offset(), which is more consistent with folio usage. Signed-off-by: Li Zetao --- fs/btrfs/extent_io.

[f2fs-dev] [PATCH 08/14] btrfs: convert try_release_extent_state() to take a folio

2024-08-21 Thread Li Zetao via Linux-f2fs-devel
The old page API is being gradually replaced and converted to use folio to improve code readability and avoid repeated conversion between page and folio. Moreover, use folio_pos() instend of page_offset(), which is more consistent with folio usage. Signed-off-by: Li Zetao --- fs/btrfs/extent_io.

[f2fs-dev] [PATCH 12/14] btrfs: convert zstd_decompress() to take a folio

2024-08-21 Thread Li Zetao via Linux-f2fs-devel
The old page API is being gradually replaced and converted to use folio to improve code readability and avoid repeated conversion between page and folio. And memcpy_to_page() can be replaced with memcpy_to_folio(). But there is no memzero_folio(), but it can be replaced equivalently by folio_zero_r

[f2fs-dev] [PATCH 07/14] btrfs: convert submit_eb_page() to take a folio

2024-08-21 Thread Li Zetao via Linux-f2fs-devel
The old page API is being gradually replaced and converted to use folio to improve code readability and avoid repeated conversion between page and folio. Signed-off-by: Li Zetao --- fs/btrfs/extent_io.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/extent_

Re: [f2fs-dev] [PATCH v3 1/9] f2fs: convert f2fs_submit_page_read() to use folio

2024-08-21 Thread Li Zetao via Linux-f2fs-devel
Hi, 在 2024/8/20 22:54, Chao Yu 写道: Convert to use folio, so that we can get rid of 'page->index' to prepare for removal of 'index' field in structure page [1]. [1] https://lore.kernel.org/all/zp8fgusibgq1t...@casper.infradead.org/ Cc: Matthew Wilcox Signed-off-by: Chao Yu --- fs/f2fs/data.

Re: [f2fs-dev] [PATCH v2 1/8] f2fs: convert f2fs_write_begin() to use folio

2024-08-19 Thread Li Zetao via Linux-f2fs-devel
Hi, 在 2024/8/20 11:46, Chao Yu 写道: Convert to use folio, so that we can get rid of 'page->index' to prepare for removal of 'index' field in structure page [1]. [1] https://lore.kernel.org/all/zp8fgusibgq1t...@casper.infradead.org/ Cc: Matthew Wilcox Signed-off-by: Chao Yu --- v2: - fix compi

Re: [f2fs-dev] [PATCH 2/8] f2fs: convert f2fs_write_end() to use folio

2024-08-19 Thread Li Zetao via Linux-f2fs-devel
Hi, 在 2024/8/19 9:20, Chao Yu 写道: Convert to use folio, so that we can get rid of 'page->index' to prepare for removal of 'index' field in structure page [1]. [1] https://lore.kernel.org/all/zp8fgusibgq1t...@casper.infradead.org/ Cc: Matthew Wilcox Signed-off-by: Chao Yu --- fs/f2fs/data.c

[f2fs-dev] [PATCH -next] f2fs: remove redundant goto statement in f2fs_read_single_page()

2023-04-24 Thread Li Zetao via Linux-f2fs-devel
After the commit "0a4ee518185", this "goto" statement was redundant, remote it for clean code. Signed-off-by: Li Zetao --- fs/f2fs/data.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 06b552a0aba2..c9a71b4b09dd 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/

[f2fs-dev] [PATCH -next] f2fs: make f2fs_sync_inode_meta() static

2023-02-22 Thread Li Zetao via Linux-f2fs-devel
After commit 26b5a079197c ("f2fs: cleanup dirty pages if recover failed"), f2fs_sync_inode_meta() is only used in checkpoint.c, so f2fs_sync_inode_meta() should only be visible inside. Delete the declaration in the header file and change f2fs_sync_inode_meta() to static. Signed-off-by: Li Zetao -