public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Vitaly Wool <vwool@ru.mvista.com>
To: Linux-MTD Mailing List <linux-mtd@lists.infradead.org>
Subject: [RFC] read-only filesystem support for NAND flash devices
Date: Wed, 10 May 2006 13:52:13 +0400	[thread overview]
Message-ID: <4461B7CD.9010100@ru.mvista.com> (raw)

Hi folks,

there had recently been some talks around $Subject... and I'm personally 
interested in implementing that, both professionally and as an 
open-source guy :)

The problem, as most of you know well, is that currently existing 
compressed read-only filesystems don't support bad block handling. OTOH, 
it's quite an attractive idea to use those for root filesystem of an 
embedded device.
As a filesystem is read-only, wear-out can't occur during the normal 
use, only on root filesystem upgrade. Therefore writing it using a tool 
like nandwrite that bypasses bad blocks seems to be enough, and the only 
thing needed is either an in-MTD layer that makes a partition look as if 
there's no babd blocks, or  similar means within a filesystem.

The only known implementation goes the former way (though I recall some 
attempts for squashfs to implement the latter one). It's at 
http://lists.infradead.org/pipermail/linux-mtd/2004-May/009695.html.
The main drawbacks I see in the implementation are:
- adds more functions/vars to struct mtd_info which is apparently a bad 
idea (it's already overcomplicated)
- modifies a lot of generic files (i. e. CFI command set 
implementations, etc.)
- possibly exposed to FTL/NFTL patents

What I'd like to suggest is to rework this patch to get rid of these 
(and probably some more) drawbacks.
Ideas:
1. Implement it on top of NAND layer.
    - use NAND bad block table, but make its construction lazy in order 
to decrease boot time (might be a useful idea anyway)
    - use tree-like structure to calculate the offset between the block 
number supplied and the actual block to read (alternatively, just add 
the how-many-to-add info to BBT entries)
2. Implement it on top of MTD layer.
    - might be reasonable to use mtdblock_ro for that
    - might be reasonable to make bad block table global for all MTD 
devices, not for NAND only and, once again, add an option to construct 
it lazily.

Comments, corrections and suggestions are welcome.

Thx,
   Vitaly

             reply	other threads:[~2006-05-10  9:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-10  9:52 Vitaly Wool [this message]
2006-05-10 11:00 ` [RFC] read-only filesystem support for NAND flash devices Josh Boyer
2006-05-10 11:20   ` Vitaly Wool
2006-05-10 13:39     ` Jörn Engel
2006-05-10 20:11       ` Josh Boyer
2006-05-11 19:06     ` Russ Dill
2006-05-11 22:26       ` David Woodhouse
2006-05-11 23:26         ` Russ Dill
2006-05-11 23:34           ` Josh Boyer
2006-05-11 23:58             ` Russ Dill
2006-05-12  8:55           ` Vitaly Wool
2006-05-12  8:52       ` Vitaly Wool
2006-05-13 14:08         ` David Woodhouse
2006-05-10 17:04   ` Atsushi Nemoto
2006-05-10 17:20     ` Josh Boyer
2006-05-10 20:01       ` Jörn Engel
2006-05-11 14:23       ` Atsushi Nemoto

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=4461B7CD.9010100@ru.mvista.com \
    --to=vwool@ru.mvista.com \
    --cc=linux-mtd@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