[PATCH v4] fs: fat: Handle 'FAT sector size mismatch'
Tom Rini
trini at konsulko.com
Fri Feb 13 15:39:38 CET 2026
On Fri, Feb 13, 2026 at 11:07:19AM +0530, Varadarajan Narayanan wrote:
> Do FAT read and write based on the device sector size
> instead of the size recorded in the FAT meta data.
>
> FAT code issues i/o in terms of the sector size. Convert that to
> device sector size before doing the actual i/o. Additionally,
> handle leading/trailing blocks when the meta data based block
> no and i/o size is not an exact multiple of the device sector
> size or vice versa.
>
> Tested on UFS device with sector size 4096 and meta data recorded
> sector size 512.
>
> Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan at oss.qualcomm.com>
> ---
> Changes in v4:
> - Fix clang warning reported in https://source.denx.de/u-boot/u-boot/-/jobs/1365316
> - Remove unused function 'size_to_blocks()'
> - Triggered CI, it fails with this error https://dev.azure.com/u-boot/u-boot/_build/results?buildId=12817&view=logs&j=a007cd84-3be0-5a02-8a7a-a34fb3052485&t=216c79d4-eaff-5600-0b8f-3a63c01a45d6&l=405. But that seems to be seen on top-of-tree without this change also.
> - Link to v3: https://lore.kernel.org/u-boot/20260122063442.2622684-1-balaji.selvanathan@oss.qualcomm.com/
And to be clear, since CI fails, this can't be merged.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260213/33be9f43/attachment.sig>
More information about the U-Boot
mailing list