Re: [PATCH 6.12] bcachefs: avoid truncating fiemap extent length
From: Sasha Levin
Date: Fri Jul 03 2026 - 22:08:12 EST
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