Re: [PATCH 6.12] bcachefs: avoid truncating fiemap extent length

Sasha Levin <[email protected]> Fri, 3 Jul 2026 22:05:22 -0400
Newsgroups org.kernel.vger.linux-bcachefs,org.kernel.vger.linux-kernel,org.kernel.vger.stable
Message-ID <[email protected]>
On Thu, Jul 03, 2026 at 02:48:13PM +0300, Mikhail Dmitrichenko wrote:
> No upstream commit exists for this patch.
>
> bkey sizes are stored in sectors as u32, while fiemap reports byte
> lengths as u64. Shifting k.k->size before widening performs the
> conversion in 32 bits, so an extent of 4 GiB or larger can wrap before
> it is passed to fiemap_fill_next_extent().

Thanks for the patch, happy to take it if we can get an ack from the bcachefs
maintainers.

-- 
Thanks,
Sasha