From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753392AbaI1KyH (ORCPT ); Sun, 28 Sep 2014 06:54:07 -0400 Received: from a.ns.miles-group.at ([95.130.255.143]:65275 "EHLO radon.swed.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750818AbaI1KyF (ORCPT ); Sun, 28 Sep 2014 06:54:05 -0400 Message-ID: <5427E8CA.8000904@nod.at> Date: Sun, 28 Sep 2014 12:54:02 +0200 From: Richard Weinberger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: Tanya Brokhman , dedeking1@gmail.com CC: Artem Bityutskiy , linux-arm-msm@vger.kernel.org, open list , linux-mtd@lists.infradead.org, Brian Norris , David Woodhouse Subject: Re: [RFC/PATCH 1/5] mtd: ubi: Read disturb infrastructure References: <1411886220-8208-1-git-send-email-tlinder@codeaurora.org> <5427C45C.2080506@nod.at> <5427CB6E.7010007@codeaurora.org> <5427CCD8.2090605@nod.at> <5427E6FE.3090906@codeaurora.org> In-Reply-To: <5427E6FE.3090906@codeaurora.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 28.09.2014 12:46, schrieb Tanya Brokhman: > On 9/28/2014 11:54 AM, Richard Weinberger wrote: >> Am 28.09.2014 10:48, schrieb Tanya Brokhman: >>>>> @@ -424,6 +440,8 @@ struct ubi_fm_sb { >>>>> __be32 used_blocks; >>>>> __be32 block_loc[UBI_FM_MAX_BLOCKS]; >>>>> __be32 block_ec[UBI_FM_MAX_BLOCKS]; >>>>> + __be32 block_rc[UBI_FM_MAX_BLOCKS]; >>>>> + __be64 block_let[UBI_FM_MAX_BLOCKS]; >>>> >>>> Doesn't this break the fastmap on-disk layout? >>> >>> What do you mean "break"? I verified fastmap feature is working. the whole read-disturb depends on it so I tested this thoroughly. >> >> Did you write a fastmap with your changes applied and then an attach using a fastmap implementation *without* >> you changes? >> I bet it will not work because the disk layout is now different. > > you're right, it wont work. I did a set of attach/detach tests to verify fastmap, but of course with my changes. > >> Linux is not the only user of fastmap. We need to be very careful here. > > Could you please elaborate here? I'm not sure I understand the use case you're referring to. Consider the case where you have a board with a fastmap enabled bootloader and a Linux OS. The bootloader does a fastmap attach and boots the kernel from UBI and the kernel it self has the rootfs on UBI too. If you install a new kernel with your changes applied it will write the fastmap in a different format and the bootloader will fail badly. In worst case the board bricks, in best case the bootloader can fall back to scanning mode but it will be slow and the customer unhappy. Thanks, //richard