From: Tom Rini Date: Fri, 23 Sep 2016 15:57:21 -0400 Subject: [U-Boot] [U-Boot, v5, 09/16] ext4: After completely filled group, scan next group from the beginning In-Reply-To: References: Message-ID: <20160923195721.GM4884@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 Tue, Sep 06, 2016 at 04:36:49AM +0200, Stefan Br?ns wrote: > The last free block of a block group may be in its middle. After it has > been allocated, the next block group should be scanned from its beginning. > > The following command triggers the bad behaviour (on a blocksize 1024 fs): > > ./sandbox/u-boot -c 'i=0; host bind 0 ./disk.raw ; > while test $i -lt 260 ; do echo $i; setexpr i $i + 1; > ext4write host 0:2 0 /X${i} 0x1450; done ; > ext4write host 0:2 0 /X240 0x2000 ; ' > > When 'X240' is extended from 5200 byte to 8192 byte, the new blocks should > start from the first free block (8811), but it uses the blocks 8098-8103 > and 16296-16297 -- 8103 + 1 + 8192 = 16296. This can be shown with > debugfs, commands 'ffb' and 'stat X240'. > > Signed-off-by: Stefan Br?ns > Reviewed-by: Lukasz Majewski Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: