public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
To: "Artem B. Bityutskiy" <dedekind@yandex.ru>
Cc: linux-mtd@lists.infradead.org, Peter Menzebach <pm-mtd@mw-itcon.de>
Subject: Re: data  loss on jffs2 filesystem on dataflash
Date: Tue, 20 Sep 2005 16:36:22 +0200	[thread overview]
Message-ID: <20050920143622.GD4634@wohnheim.fh-wedel.de> (raw)
In-Reply-To: <43301877.3040306@yandex.ru>

On Tue, 20 September 2005 18:11:03 +0400, Artem B. Bityutskiy wrote:
> Jörn Engel wrote:
> >Still can't.  Block devices have the attribute that writing AAA... to
> >a block containing BBB... gives you one of three possible results in
> >case of power failure:
> >
> >1. BBB...BBB all written
> >2. AAA...AAA nothing written
> >3. AAA...BBB partially written.
> >
> >Flash doesn't have 3, but two more cases:
> >4. FFF...FFF erased, nothing written
> >5. AAA...FFF erased, partially written
> >
> >Plus the really obnoxious
> >6. FFF...FFF partially erased.  Looks fine but some bits may flip
> >   randomly, writes may not stick, etc.
> >
> >Now try finding a filesystem that is robust if 4-6 happens. ;)
> Don't underastand this. If you mean the atomicity, CRC may help here. 
> And no problems. Or may be you missed the the fact that we have 
> eraseblock size = writeblock size?

Image this block contains the used block bitmap of ext2.  All blocks
handled with this bitmap are free, so the complete block contains
zeroes.  Now we allocate a single block, writing a single one to the
bitmap.  When writing, a power failure happens right after the erase:

Before:
00000000000

After:
FFFFFFFFFF

Gee, every single block is used now.  Good thing this happened to the
block bitmap, so we only lost some space on the fs.  Somewhere else,
we'd have data corruption.

Any hard disk filesystem will suffer some kind of corruption in such a
case.  They heavily depend on the non-existance of 4-6.

> >>JFFS2 orients to "classical" flashes. They have no "write page with 
> >>built-in erase" operation.
> >What does this thing do?
> It erases individual page, then writes there. To put it differently, in 
> your terminology, eraseblock size = writeblock size.

Neat.

> P.S. I actually missed the mailing list, this should have gone to the 
> MTD ML. So let's move there please.

As always.  You fuck it up, I get to fix it. ;)

Jörn

-- 
Homo Sapiens is a goal, not a description.
-- unknown

  parent reply	other threads:[~2005-09-20 14:37 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-14 12:09 data loss on jffs2 filesystem on dataflash Peter Menzebach
2005-09-14 12:30 ` Artem B. Bityuckiy
2005-09-14 13:43   ` Peter Menzebach
2005-09-15  7:48     ` Artem B. Bityuckiy
2005-09-15  7:39   ` Peter Menzebach
2005-09-15  7:49     ` Artem B. Bityuckiy
2005-09-15  7:53     ` Artem B. Bityuckiy
     [not found]       ` <43292AC6.40809@mw-itcon.de>
     [not found]         ` <43292E16.70401@yandex.ru>
     [not found]           ` <43292F91.9010302@mw-itcon.de>
2005-09-20 10:18             ` Artem B. Bityutskiy
     [not found]               ` <432FEF55.5090700@mw-itcon.de>
2005-09-20 11:21                 ` Artem B. Bityutskiy
2005-09-20 13:16                 ` Artem B. Bityutskiy
     [not found]                 ` <433006D8.4010502@yandex.ru>
2005-09-20 13:18                   ` Artem B. Bityutskiy
2005-09-20 13:38                     ` Peter Menzebach
2005-09-20 14:18                       ` Artem B. Bityutskiy
2005-09-20 15:01                         ` Peter Menzebach
2005-09-20 15:11                           ` Andrew Victor
2005-09-20 15:22                             ` Jörn Engel
2005-09-20 16:31                             ` Artem B. Bityutskiy
2005-09-21  7:21                               ` Andrew Victor
2005-09-21  9:25                                 ` Artem B. Bityutskiy
2005-09-21 10:27                                   ` Peter Menzebach
2005-09-21 13:36                                     ` Artem B. Bityutskiy
2005-09-21 13:41                                       ` Artem B. Bityutskiy
2005-09-21 15:44                                       ` Peter Menzebach
2005-09-21 15:59                                         ` Artem B. Bityutskiy
2005-09-21 16:10                                           ` Peter Menzebach
2005-09-21 16:19                                             ` Artem B. Bityutskiy
2005-09-21 17:10                                               ` Peter Menzebach
2005-09-22 10:38                                                 ` Peter Menzebach
2005-09-22 10:51                                                   ` Artem B. Bityutskiy
2005-09-20 15:11                           ` Artem B. Bityutskiy
2005-09-20 15:45                             ` Peter Menzebach
     [not found]                   ` <20050920133244.GC4634@wohnheim.fh-wedel.de>
     [not found]                     ` <43301877.3040306@yandex.ru>
2005-09-20 14:36                       ` Jörn Engel [this message]
2005-09-20 14:48                         ` Artem B. Bityutskiy
2005-09-15  8:02     ` Artem B. Bityuckiy
     [not found]       ` <43292E94.4020702@mw-itcon.de>
2005-09-15  8:26         ` Artem B. Bityuckiy
2005-09-15  8:33           ` Peter Menzebach
2005-09-15  8:47         ` Artem B. Bityuckiy
2005-09-15  9:14           ` Peter Menzebach
2005-09-15  9:25             ` Artem B. Bityuckiy
2005-09-21 13:55           ` Peter Menzebach
2005-09-21 13:59             ` Artem B. Bityutskiy
2005-09-15 10:32         ` Artem B. Bityuckiy
2005-09-22 12:30 ` Peter Menzebach
2005-09-22 12:44   ` Artem B. Bityutskiy
2005-09-22 13:31     ` Peter Menzebach
2005-09-22 14:06       ` Artem B. Bityutskiy
2005-09-22 14:32         ` Andrew Victor
2005-09-22 14:45           ` Artem B. Bityutskiy
2005-09-22 14:59           ` Peter Menzebach
2005-09-22 16:14           ` Peter Menzebach
2005-09-22 17:09             ` Peter Menzebach

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=20050920143622.GD4634@wohnheim.fh-wedel.de \
    --to=joern@wohnheim.fh-wedel.de \
    --cc=dedekind@yandex.ru \
    --cc=linux-mtd@lists.infradead.org \
    --cc=pm-mtd@mw-itcon.de \
    /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