Re: [PATCH] btrfs: use u64 for the page indices in heuristic_collect_sample()
From: David Sterba
Date: Fri Sep 11 2026 - 13:37:11 EST
On Wed, Sep 09, 2026 at 01:10:48PM -0400, Tal Zussman wrote:
> index and index_end are derived from the u64 start and end offsets, and
> index is shifted back into a byte offset for offset_in_folio(), which
> needs a cast to u64 to be safe on 32-bit. Make them u64 instead so the
> cast goes away. They still fit pgoff_t where they are passed to
> filemap_get_folio(), as they came from a valid file offset.
>
> Signed-off-by: Tal Zussman <tz2294@xxxxxxxxxxxx>
Added to for-next, thanks.