From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 5 Dec 2019 13:37:45 -0500 Subject: [PATCH v4 1/6] fat: write: fix broken write to fragmented files In-Reply-To: References: <20191202111118.12868-1-m.szyprowski@samsung.com> <20191202111118.12868-2-m.szyprowski@samsung.com> <20191205175210.2fb30dbd@jawa> Message-ID: <20191205183745.GQ9549@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > >> --- > >> > >> 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: