[PATCH v3] fs: fat: Handle 'FAT sector size mismatch'
Tom Rini
trini at konsulko.com
Thu Jan 22 16:01:35 CET 2026
On Thu, Jan 22, 2026 at 12:04:42PM +0530, Balaji Selvanathan wrote:
> From: Varadarajan Narayanan <varadarajan.narayanan at oss.qualcomm.com>
>
> 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 v3:
> - Respin, no changes
> - Link to v2: https://lore.kernel.org/u-boot/20241125085213.460723-1-quic_varada@quicinc.com/
>
> Changes in v2:
> - fat_sect_size is declared as static
> - The else block in disk_write() function has been removed
> - The commit message has additional details about testing
> - Link to v1: https://lore.kernel.org/u-boot/20241119073048.3469260-1-quic_varada@quicinc.com/
Have you put this through CI
https://docs.u-boot.org/en/latest/develop/ci_testing.html or manually
run the filesystem tests locally? It would also be good to know that CI
does pass since I saw some divides and modulos in there and knowing we
don't run in to the cases where that needs to be a shift or use a helper
macro now would be good. Thanks.
--
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/20260122/846b3240/attachment.sig>
More information about the U-Boot
mailing list