]> git.ipfire.org Git - thirdparty/linux.git/commit
btrfs: migrate extent_buffer::pages[] to folio
authorQu Wenruo <wqu@suse.com>
Wed, 6 Dec 2023 23:09:27 +0000 (09:39 +1030)
committerDavid Sterba <dsterba@suse.com>
Fri, 15 Dec 2023 22:01:04 +0000 (23:01 +0100)
commit082d5bb9b336d533b7b968f4f8712e7755a9876a
tree458c3d9216a955d8247df19648c49b43b7cc83b5
parent09e6cef19c9fc0e10547135476865b5272aa0406
btrfs: migrate extent_buffer::pages[] to folio

For now extent_buffer::pages[] are still only accepting single page
pointer, thus we can migrate to folios pretty easily.

As for single page, page and folio are 1:1 mapped, including their page
flags.

This patch would just do the conversion from struct page to struct
folio, providing the first step to higher order folio in the future.

This conversion is pretty simple:

- extent_buffer::pages[] -> extent_buffer::folios[]

- page_address(eb->pages[i]) -> folio_address(eb->pages[i])

- eb->pages[i] -> folio_page(eb->folios[i], 0)

There would be more specific cleanups preparing for the incoming higher
order folio support.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/accessors.c
fs/btrfs/accessors.h
fs/btrfs/ctree.c
fs/btrfs/disk-io.c
fs/btrfs/extent_io.c
fs/btrfs/extent_io.h
fs/btrfs/tests/extent-io-tests.c