From: Artem Bityutskiy <dedekind1@gmail.com>
To: Norbert van Bolhuis <nvbolhuis@aimvalley.nl>
Cc: linux-mtd@lists.infradead.org, dwmw2@infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCHv2] MTD: Add UBI reboot notifier
Date: Fri, 12 Feb 2010 17:21:00 +0200 [thread overview]
Message-ID: <1265988060.30922.35.camel@localhost> (raw)
In-Reply-To: <4B755B72.9060805@aimvalley.nl>
On Fri, 2010-02-12 at 14:45 +0100, Norbert van Bolhuis wrote:
> Artem Bityutskiy wrote:
> > FYI, I do not like this patch, because it is not solving the problem, it
> > just makes the problem less likely. I.e., you are still screwed if you
> > reboot while some other task is doing erasure. Indeed, the background
> > thread is not the only task which may do erases.
> >
> > I'm not going to revert this patch, but wanted to let you know that I
> > think it was my mistake to push it.
> >
>
> so, how to solve this properly ?
>
> probably the only way is the reboot notifier of the MTD chip driver
> (for NOR flash only cmdset_0001 has one).
Well. UBI itself does not have problems with half-erased eraseblocks. As
the comment to the patch says, this is for a strange platform where the
boot loader panics when it encounters a half-erased EB.
So the most proper fix is to fix the boot-loader. Remember, a power cut
can introduce half-erased EBs, and you cannot address this in SW.
For clean reboots, you would need to have a reboot notifier in the MTD
lever, not in UBI. This notifier should:
1. Finish the current erase operation.
2. Prevent further erase operations.
The UBI patch is not a good solution.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
WARNING: multiple messages have this Message-ID (diff)
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Norbert van Bolhuis <nvbolhuis@aimvalley.nl>
Cc: Kevin Cernekee <kpc.mtd@gmail.com>,
linux-mtd@lists.infradead.org, dwmw2@infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCHv2] MTD: Add UBI reboot notifier
Date: Fri, 12 Feb 2010 17:21:00 +0200 [thread overview]
Message-ID: <1265988060.30922.35.camel@localhost> (raw)
In-Reply-To: <4B755B72.9060805@aimvalley.nl>
On Fri, 2010-02-12 at 14:45 +0100, Norbert van Bolhuis wrote:
> Artem Bityutskiy wrote:
> > FYI, I do not like this patch, because it is not solving the problem, it
> > just makes the problem less likely. I.e., you are still screwed if you
> > reboot while some other task is doing erasure. Indeed, the background
> > thread is not the only task which may do erases.
> >
> > I'm not going to revert this patch, but wanted to let you know that I
> > think it was my mistake to push it.
> >
>
> so, how to solve this properly ?
>
> probably the only way is the reboot notifier of the MTD chip driver
> (for NOR flash only cmdset_0001 has one).
Well. UBI itself does not have problems with half-erased eraseblocks. As
the comment to the patch says, this is for a strange platform where the
boot loader panics when it encounters a half-erased EB.
So the most proper fix is to fix the boot-loader. Remember, a power cut
can introduce half-erased EBs, and you cannot address this in SW.
For clean reboots, you would need to have a reboot notifier in the MTD
lever, not in UBI. This notifier should:
1. Finish the current erase operation.
2. Prevent further erase operations.
The UBI patch is not a good solution.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
next prev parent reply other threads:[~2010-02-12 15:21 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-09 5:14 [PATCH] MTD: Add UBI reboot notifier Kevin Cernekee
2009-06-09 5:14 ` Kevin Cernekee
2009-06-09 12:13 ` Artem Bityutskiy
2009-06-09 12:13 ` Artem Bityutskiy
2009-06-09 12:32 ` Artem Bityutskiy
2009-06-09 12:32 ` Artem Bityutskiy
2009-06-09 17:59 ` [PATCHv2] " Kevin Cernekee
2009-06-09 17:59 ` Kevin Cernekee
2009-06-10 9:35 ` Artem Bityutskiy
2009-06-10 9:35 ` Artem Bityutskiy
2009-06-10 11:59 ` Artem Bityutskiy
2009-06-10 11:59 ` Artem Bityutskiy
2009-06-10 17:27 ` Kevin Cernekee
2009-06-10 17:27 ` Kevin Cernekee
2010-02-12 13:13 ` Artem Bityutskiy
2010-02-12 13:13 ` Artem Bityutskiy
2010-02-12 13:45 ` Norbert van Bolhuis
2010-02-12 13:45 ` Norbert van Bolhuis
2010-02-12 15:20 ` David Woodhouse
2010-02-12 15:20 ` David Woodhouse
2010-02-12 15:21 ` Artem Bityutskiy [this message]
2010-02-12 15:21 ` Artem Bityutskiy
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=1265988060.30922.35.camel@localhost \
--to=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=nvbolhuis@aimvalley.nl \
/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.