mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Cc: Hans Zhang <zhanghonghui@innofidei.com>,
	Richard Genoud <richard.genoud@gmail.com>,
	linux-mtd <linux-mtd@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	zhouguangming@innofidei.com
Subject: Re: [PATCH] Make the mtdblock read/write skip the bad nand sector
Date: Mon, 25 Nov 2013 12:16:10 +0000	[thread overview]
Message-ID: <1385381770.24518.18.camel@shinybook.infradead.org> (raw)
In-Reply-To: <20131125115238.GC2408@localhost>

[-- Attachment #1: Type: text/plain, Size: 1243 bytes --]

On Mon, 2013-11-25 at 08:52 -0300, Ezequiel Garcia wrote:
> 
> Your understanding is correct: NAND *must* be erased explictly in
> userspace
> before writing. However, keep in mind the following additional
> constraints:
> 
> * Writing should be always performed using 'nandwrite',
>   not tools such as 'cat' or 'dd'.
> 
> * An mtdblock shouldn't be used to access directly the NAND from
>   userspace. AFAICS, the primarily usage of mtdblock is to be able to
>   mount JFFS2.

No. You don't need mtdblock to mount JFFS2 at all.

The mtdblock driver was used in the *very* early days of the MTD system,
on NOR flash with a "traditional" file system. Either in read-only mode
for something like cramfs, or in a very unsafe writeable mode. We
actually put ext2 on it for the Compaq iPaq for a while, before we had
JFFS.

It was used as a shortcut for mounting JFFS2, and still is by a lot of
people, but it's certainly not necessary. You can turn off CONFIG_BLOCK
entirely and still use JFFS2.

You should consider mtdblock to be the most basic, primitive, "flash
translation layer" that can possibly exist. And thus, should basically
never use it. I certainly don't approve of trying to extend it.

-- 
dwmw2


[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5745 bytes --]

  reply	other threads:[~2013-11-25 12:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-21  8:54 Hans Zhang
2013-11-21 10:59 ` Richard Genoud
     [not found]   ` <528EB1E3.7030101@innofidei.com>
2013-11-22  1:52     ` Ezequiel Garcia
     [not found]       ` <528EBD0B.5010006@innofidei.com>
2013-11-22  8:14         ` Richard Weinberger
2013-11-22 11:45         ` Ezequiel Garcia
     [not found]           ` <5292A7E7.5060003@innofidei.com>
2013-11-25 10:11             ` Ezequiel Garcia
2013-11-25 10:23               ` Richard Genoud
     [not found]                 ` <529334D9.2030204@innofidei.com>
2013-11-25 11:52                   ` Ezequiel Garcia
2013-11-25 12:16                     ` David Woodhouse [this message]
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
  -- 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=1385381770.24518.18.camel@shinybook.infradead.org \
    --to=dwmw2@infradead.org \
    --cc=ezequiel.garcia@free-electrons.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --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

all inboxes | Powered by JetHome®