All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: Tanya Brokhman <tlinder@codeaurora.org>, dedeking1@gmail.com
Cc: Artem Bityutskiy <dedekind1@gmail.com>,
	linux-arm-msm@vger.kernel.org,
	open list <linux-kernel@vger.kernel.org>,
	linux-mtd@lists.infradead.org,
	Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [RFC/PATCH 1/5] mtd: ubi: Read disturb infrastructure
Date: Thu, 02 Oct 2014 15:24:19 +0200	[thread overview]
Message-ID: <542D5203.2080601@nod.at> (raw)
In-Reply-To: <542D49FD.7040204@codeaurora.org>

Am 02.10.2014 14:50, schrieb Tanya Brokhman:
>> 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.
>>
> 
> Ok, I understand the problem now. I wanted to discuss a possible solution before implementing it:
> We have a "fastmap version" in fm_sb. At the moment UBI_FM_FMT_VERSION = 1 and any other is not supported. We can use that; Add another fm version (UBI_FM_FMT_VERSION_RD = 2) and
> then decide according to it. Meaning, if during attach process we find fm superblock we check it's version, if it's != UBI_FM_FMT_VERSION_RD, we fall back to full scan. The next
> fastmap will be written with the new layout (and new version number) so second boot will attach from fastmap without any issues.

Yes, if we change the fastmap on-disk layout we need to change UBI_FM_FMT_VERSION.
Then other fastmap implementations will notice the change and can hopefully recover.
Implementations which do not evaluate UBI_FM_FMT_VERSION deserve breaking. ;-)

That said, I'll not block a layout change but we have to be sure that it is *really* needed.
I'm currently heavily working on fastmap and my local queue with fastmap fixes keeps growing.
If I find a horror bug which needs a fastmap layout change I want to change the layout only once,
not twice.

Thanks,
//richard

  reply	other threads:[~2014-10-02 13:24 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-28  6:37 [RFC/PATCH 1/5] mtd: ubi: Read disturb infrastructure Tanya Brokhman
2014-09-28  6:37 ` Tanya Brokhman
2014-09-28  6:37 ` Tanya Brokhman
2014-09-28  8:18 ` Richard Weinberger
2014-09-28  8:18   ` Richard Weinberger
2014-09-28  8:48   ` Tanya Brokhman
2014-09-28  8:54     ` Richard Weinberger
2014-09-28 10:46       ` Tanya Brokhman
2014-09-28 10:54         ` Richard Weinberger
2014-10-02 12:50           ` Tanya Brokhman
2014-10-02 13:24             ` Richard Weinberger [this message]
2014-10-02 13:42               ` Tanya Brokhman
2014-10-02 14:05                 ` Richard Weinberger
2014-10-03 15:38                   ` Artem Bityutskiy
2014-10-03 15:38                     ` Artem Bityutskiy
2014-10-07 13:55                 ` Richard Weinberger
2014-10-02 13:36             ` Richard Weinberger
2014-10-02 14:11               ` Tanya Brokhman
2014-09-28 12:11 ` Artem Bityutskiy
2014-09-28 12:11   ` Artem Bityutskiy
2014-09-28 14:54   ` Tanya Brokhman
2014-09-28 18:13 ` Jeremiah Mahler
2014-09-29  4:46   ` Tanya Brokhman
2014-09-29  6:49     ` Jeremiah Mahler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=542D5203.2080601@nod.at \
    --to=richard@nod.at \
    --cc=computersforpeace@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=dedeking1@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=tlinder@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.