[U-Boot] [BUG] cb8af8af5ba0 "fs: fat: support write with non-zero offset" fatwrite followed by fatload and then cmp fails
Faiz Abbas
faiz_abbas at ti.com
Tue Mar 12 08:41:08 UTC 2019
Hi Akashi,
On 11/09/18 12:29 PM, Akashi, Takahiro wrote:
> From: AKASHI Takahiro <takahiro.akashi at linaro.org>
>
> The current write implementation is quite simple: remove existing clusters
> and then allocating new ones and filling them with data. This, inevitably,
> enforces always writing from the beginning of a file.
>
> As the first step to lift this restriction, fat_file_write() and
> set_contents() are modified to accept an additional parameter, file offset
> and further re-factored so that, in the next patch, all the necessary code
> will be put into set_contents().
>
> Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
> ---
My fatwrite, fatload and compare tests are failing in MMC with this
commit. This is what I see:
=> fatwrite mmc 0 ${loadaddr} test 0x2000000
33554432 bytes written
=> fatload mmc 0 84000000 test
33554432 bytes read in 2149 ms (14.9 MiB/s)
=> cmp.b 82000000 84000000 0x2000000
byte at 0x820c5000 (0x85) != byte at 0x840c5000 (0x9d)
Total of 806912 byte(s) were the same
=>
Reverting this commit fixes this issue for me.
Thanks,
Faiz
More information about the U-Boot
mailing list