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

2024-08-21 Thread Matthew Wilcox
On Thu, Aug 22, 2024 at 09:37:05AM +0800, Li Zetao wrote: > @@ -762,7 +762,7 @@ static struct page *btrfs_read_merkle_tree_page(struct > inode *inode, >* [ inode objectid, BTRFS_MERKLE_ITEM_KEY, offset in bytes ] >*/ > ret = read_key_bytes(BTRFS_I(inode), BTRFS_VERITY_MERKLE_

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

2024-08-21 Thread Matthew Wilcox
On Thu, Aug 22, 2024 at 09:37:02AM +0800, Li Zetao wrote: > static struct extent_buffer *get_next_extent_buffer( > - const struct btrfs_fs_info *fs_info, struct page *page, u64 > bytenr) > + const struct btrfs_fs_info *fs_info, struct folio *folio, u64 > bytenr) > { >

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

2024-08-21 Thread Matthew Wilcox
On Thu, Aug 22, 2024 at 09:37:01AM +0800, Li Zetao wrote: > -void clear_page_extent_mapped(struct page *page) > +void clear_page_extent_mapped(struct folio *folio) Rename it to clear_folio_extent_mapped()? ___ Linux-f2fs-devel mailing list Linux-f2fs-

[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-21 Thread Chao Yu via Linux-f2fs-devel
On 2024/8/20 14:58, Chao Yu wrote: On 2024/8/20 12:38, Li Zetao wrote: I want to apply your patch set for testing, but there is a conflict on the master branch of linux-next. Maybe it depends on a certain pre-patch. Please let me know, thank you.    Applying: f2fs: convert f2fs_write_begin()