Re: [PATCH v2 3/8] fs/mpage: avoid negative shift for large blocksize

Matthew Wilcox
2025-02-17T21:48:19Z

On Tue, Feb 04, 2025 at 03:12:04PM -0800, Luis Chamberlain wrote:
> From: Hannes Reinecke <hare@kernel.org>
>
> For large blocksizes the number of block bits is larger than PAGE_SHIFT,
> so use instead use folio_pos(folio) >> blkbits to calculate the sector

"so calculate the sector number from the byte offset instead"

> number. This is required to enable large folios with buffer-heads.
>
> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
> Signed-off-by: Hannes Reinecke <hare@kernel.org>

Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>