[PATCH v3] fs: fat: Handle 'FAT sector size mismatch'

Tom Rini trini at konsulko.com
Wed Jan 28 21:41:02 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>

First thing, clang shows a lot of warnings from this:
https://source.denx.de/u-boot/u-boot/-/jobs/1365316
Second thing, filesystem tests do pass:
https://source.denx.de/u-boot/u-boot/-/jobs/1365314
Please make sure v4 is put through CI:
https://docs.u-boot.org/en/latest/develop/ci_testing.html

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/20260128/44244af1/attachment.sig>


More information about the U-Boot mailing list