public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Brian Norris <computersforpeace@gmail.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Richard Genoud <richard.genoud@gmail.com>,
	zhouguangming@innofidei.com,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-mtd <linux-mtd@lists.infradead.org>,
	Ezequiel Garcia <ezequiel.garcia@free-electrons.com>,
	Hans Zhang <zhanghonghui@innofidei.com>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH] Make the mtdblock read/write skip the bad nand sector
Date: Mon, 9 Dec 2013 23:43:47 -0800	[thread overview]
Message-ID: <20131210074347.GB11489@norris.computersforpeace.net> (raw)
In-Reply-To: <20131129132653.GA14204@amd.pavel.ucw.cz>

On Fri, Nov 29, 2013 at 02:26:53PM +0100, Pavel Machek wrote:
> > >  > Thanks a lot for the insight. After reading this, I'm wondering what's
> > >  > preventing us from killing MTD block support altogether. Artem, already
> > >  > suggested it a while back...
> > > 
> > > People using squashfs/cramfs/readonly ext2/.. on a NOR flash?
> > 
> > And people who *still*, after all these years, don't realise that they
> > don't actually need it to mount JFFS2. Even as the root file system
> > (although they *do* need rootfstype=jffs2).
> 
> I must admit I'm such person...

Even the Kconfig disagrees with David :)

config MTD_BLOCK
        tristate "Caching block device access to MTD devices"
...
          At the moment, it is also required for the Journalling Flash File
          System(s) to obtain a handle on the MTD device when it's mounted
          (although JFFS and JFFS2 don't actually use any of the functionality
          of the mtdblock device).

The website is more forthcoming, but it still says it's needed for the
rootfs:

  http://linux-mtd.infradead.org/faq/jffs2.html#L_mtdblock

So I suppose we really need to clean this up, eh?

...

> (Should not mtdblock be at least in devices.txt file?)

Probably.

> BTW... is there documentation of mtdblock "translation layer"
> somewhere? I realize it is very simple, but it does need to keep some
> data?

There's a bit scattered around the MTD website, but this FAQ has a
little:

  http://linux-mtd.infradead.org/faq/general.html#L_ext2_mtd

Really, the "translation" is truly dead simple; I believe it is simply
an identity mapping, where the mtd is mapped linearly to the mtdblock.
So address X in /dev/mtdY is address X in /dev/mtdblockY.

> I guess running jffs on regular block device (USB stick, SD card) is
> not feasible?

http://linux-mtd.infradead.org/faq/jffs2.html#L_stick_jffs2

Brian

  reply	other threads:[~2013-12-10  7:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-21  8:54 [PATCH] Make the mtdblock read/write skip the bad nand sector Hans Zhang
2013-11-21 10:59 ` Richard Genoud
2013-11-22  1:22   ` Hans Zhang
2013-11-22  1:52     ` Ezequiel Garcia
2013-11-22  2:10       ` Hans Zhang
2013-11-22  8:14         ` Richard Weinberger
2013-11-22 11:45         ` Ezequiel Garcia
2013-11-25  1:29           ` Hans Zhang
2013-11-25 10:11             ` Ezequiel Garcia
2013-11-25 10:23               ` Richard Genoud
2013-11-25 11:30                 ` Hans Zhang
2013-11-25 11:52                   ` Ezequiel Garcia
2013-11-25 12:16                     ` David Woodhouse
2013-11-25 12:30                       ` Ezequiel Garcia
2013-11-25 15:12                         ` Peter Korsgaard
2013-11-25 15:46                           ` David Woodhouse
2013-11-29 13:26                             ` Pavel Machek
2013-12-10  7:43                               ` Brian Norris [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-11-21  8:39 Hans Zhang

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=20131210074347.GB11489@norris.computersforpeace.net \
    --to=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=ezequiel.garcia@free-electrons.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=pavel@ucw.cz \
    --cc=richard.genoud@gmail.com \
    --cc=zhanghonghui@innofidei.com \
    --cc=zhouguangming@innofidei.com \
    /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