]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fs/mpage: use blocks_per_folio instead of blocks_per_page
authorLuis Chamberlain <mcgrof@kernel.org>
Fri, 21 Feb 2025 22:38:19 +0000 (14:38 -0800)
committerChristian Brauner <brauner@kernel.org>
Mon, 24 Feb 2025 10:44:43 +0000 (11:44 +0100)
commit8b45a4f4133d30b1d50cc7161265cf78ad9b5807
tree516eeb3fa2542fa78ca675d480a6b2da60babe8c
parent86c60efd7c0ede43bd677f2eee1d84200528df1e
fs/mpage: use blocks_per_folio instead of blocks_per_page

Convert mpage to folios and adjust accounting for the number of blocks
within a folio instead of a single page. This also adjusts the number
of pages we should process to be the size of the folio to ensure we
always read a full folio.

Note that the page cache code already ensures do_mpage_readpage() will
work with folios respecting the address space min order, this ensures
that so long as folio_size() is used for our requirements mpage will
also now be able to process block sizes larger than the page size.

Originally-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/20250221223823.1680616-5-mcgrof@kernel.org
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/mpage.c