From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Date: Wed, 3 Feb 2016 11:18:50 +0100 Subject: [U-Boot] [PATCH] fastboot: sparse: fix chunk write offset calculation In-Reply-To: <1454402611-17864-1-git-send-email-jeffy.chen@rock-chips.com> References: <1454402611-17864-1-git-send-email-jeffy.chen@rock-chips.com> Message-ID: <20160203101850.GF4652@lukather> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Jeffy, On Tue, Feb 02, 2016 at 04:43:31PM +0800, Jeffy Chen wrote: > We should count skipped blocks in when calculating write offset. > > Signed-off-by: Jeffy Chen As I told you, this won't work in the NAND case. If there's a bad block in the NAND, the offset will be incremented by a block, and it won't be taken into account by the fastboot client, and you'll end up writing on a block you already wrote to. I guess the only solution is to make the storage backend scan the area you skip so that it adjusts the skipped size, possibly extending it. Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: