Re: [U-Boot] [PATCH v3 1/6] fat: write: fix broken write to fragmented files

2019-11-27 Thread Marek Szyprowski
Hi, On 27.11.2019 03:26, AKASHI Takahiro wrote: > Thank you for the heads-up. > > On Tue, Nov 26, 2019 at 11:57:29AM -0500, Tom Rini wrote: >> On Tue, Nov 26, 2019 at 09:15:07AM +0100, Marek Szyprowski wrote: >> >>> The code for handing file overwrite incorrectly assumed that the file on >>> disk

Re: [U-Boot] [PATCH v3 1/6] fat: write: fix broken write to fragmented files

2019-11-26 Thread AKASHI Takahiro
Thank you for the heads-up. On Tue, Nov 26, 2019 at 11:57:29AM -0500, Tom Rini wrote: > On Tue, Nov 26, 2019 at 09:15:07AM +0100, Marek Szyprowski wrote: > > > The code for handing file overwrite incorrectly assumed that the file on > > disk is always contiguous. This resulted in corrupting disk

Re: [U-Boot] [PATCH v3 1/6] fat: write: fix broken write to fragmented files

2019-11-26 Thread Tom Rini
On Tue, Nov 26, 2019 at 09:15:07AM +0100, Marek Szyprowski wrote: > 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

[U-Boot] [PATCH v3 1/6] fat: write: fix broken write to fragmented files

2019-11-26 Thread Marek Szyprowski
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