[PATCH v4 1/6] fat: write: fix broken write to fragmented files

Tom Rini trini at konsulko.com
Thu Dec 5 19:37:45 CET 2019


On Thu, Dec 05, 2019 at 06:58:15PM +0100, Matthias Brugger wrote:
> 
> 
> On 05/12/2019 17:52, Lukasz Majewski wrote:
> > Hi Tom, Matthias,
> > 
> >> The code for handing file overwrite incorrectly assumed that the file
> >> on disk is always contiguous. This resulted in corrupting disk
> >> structure every time when write to existing fragmented file happened.
> >> Fix this by adding proper check for cluster discontinuity and adjust
> >> chunk size on each partial write.
> >>
> >> Signed-off-by: Marek Szyprowski <m.szyprowski at samsung.com>
> >> ---
> >>
> >> This patch partially fixes the issue revealed by the following test
> >> script:
> >>
> > 
> > Tom could you pic this patch and the following one (2/6):
> > https://patchwork.ozlabs.org/patch/1203101/
> > 
> > to -master as a fix?
> > 
> > This seems like a _real_ fix for FAT.
> 
> Right, I think the first patches should go in for v2020.01. I can send them
> together with some fixes for RPi I'm working on.
> 
> Tom what do you think?

I'd _really_ like to see the test that's in the commit message turned in
to a test we can run from CI as Travis will be doing those Soon(TM) and
GitLab/Azure do.  Then I'll pick them up (I'm testing some other fat
fixes right now).  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20191205/ca63e64d/attachment.sig>


More information about the U-Boot mailing list