mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Juergen Beisert <jbe@pengutronix.de>
To: barebox@lists.infradead.org
Subject: Re: protecting env partitions from bad blocks
Date: Sun, 5 Jun 2011 14:11:55 +0200	[thread overview]
Message-ID: <201106051411.55383.jbe@pengutronix.de> (raw)
In-Reply-To: <4DEB6D69.5030003@wellsense-tech.com>

Hi,

Boaz Ben-David wrote:
> I want to protect the env partition on my device from bad blocks
> (created during operation or already there out of the factory).

Maybe you mean the same, but you cannot really _protect_ them from bad blocks.

> Couldn't find any good documentation regarding this issue, so I have
> some questions:
>
> 1. Exactly what capabilities the bb devices in Barebox give me?

Handling a flash based memory in a linear manner, even if there are "holes" in 
the memory.

non-bb |---------------------|BB|------------------------------|
                           |---ESU--|
bb     |-----------------------------------------------|

Reading the "non-bb" will give you an error message, when you try to read from 
the offset the BadBlock is located. Reading the "bb" silently skips the 
BadBlock for you. By the price the usable size is smaller.
ESU is a "erase size unit" you always will lose if it contains a bad block.

> 2. I was thinking of somehow assigning the env partition larger than
> required in order to later
> handle bad blocks by moving the block currenly being used to be the
> first good block.
> Is this a good approach or maybe there is something already ready and I
> shouldn't bother because I am totally missing the point?

You should increase the partitions in "erase block size units". Recent NAND 
flashes are using 128 kiB erase size units. So, increasing by 256 kiB will 
give you two spare "erase block size units".

jbe

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | Phone: +49-5121-206917-5128 |
Vertretung Sued/Muenchen, Germany             | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686              | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2011-06-05 12:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-05 11:50 Boaz Ben-David
2011-06-05 12:11 ` Juergen Beisert [this message]
2011-06-05 12:38   ` Boaz Ben-David
2011-06-06  7:25     ` Sascha Hauer

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=201106051411.55383.jbe@pengutronix.de \
    --to=jbe@pengutronix.de \
    --cc=barebox@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox