public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: simon@baydel.com
Cc: linux-mtd@lists.infradead.org
Subject: Re: JFFS2 Corruption.
Date: Tue, 24 Feb 2004 12:00:10 +0000	[thread overview]
Message-ID: <1077624009.7826.266.camel@hades.cambridge.redhat.com> (raw)
In-Reply-To: <403B1DDE.22464.B72D0@localhost>

On Tue, 2004-02-24 at 09:48 +0000, simon@baydel.com wrote:
> Comitted the sin of posting a reply with the reply text first, sorry.

And this time you committed the sin of including _far_ more of the
previous mail(s) than was necessary. But I'm not feeling cruel today so
I'll not continue to ignore you :)

> I have only managed to get this to fail if the jffs2 filesystem is mounted as root. I do 
> not seem to be able to get it to close and unmount the filesystem at shutdown. I 
> guess the BLKFLSBUF I do only flushes the buffer that is created when I open the 
> device and not the one that was created when the kernel opened the device. 

JFFS2 doesn't actually _use_ the mtdblock device. If you look closely at
the code, you'll see we never read or write to/from it, we just use the
minor number as an argument to get_mtd_device(). 

In fact, it's perfectly possible to use any _other_ device driver
instead of the mtdblock device, as long as it has the major number which
JFFS2 is looking for. 

I wonder if the rootfs-mounting is opening the _actual_ block device and
doing some I/O, and that's later getting flushed, causing corruption.
Although I can't comprehend why a failed attempt to mount, for example,
ext2 would cause the mtdblock device to consider its buffer _dirty_ and
try to write it back on close.

What happens if you use the 'mtdblock_ro' device instead? That shares
the major number, but doesn't share the caching.


-- 
dwmw2

  reply	other threads:[~2004-02-24 12:00 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-19 16:48 JFFS2 Corruption simon
2004-02-23 11:07 ` simon
2004-02-24  9:48   ` simon
2004-02-24 12:00     ` David Woodhouse [this message]
2004-02-24 12:54       ` Simon Haynes
2004-02-24 13:04       ` Simon Haynes
2004-02-24 13:40         ` Simon Haynes
2004-02-24 14:22           ` David Woodhouse
2004-02-24 14:25             ` Simon Haynes
2004-02-24 14:56               ` David Woodhouse
2004-02-24 14:58                 ` Simon Haynes
2004-02-24 15:35                   ` David Woodhouse
2004-02-24 15:47                     ` Simon Haynes
2004-02-24 16:14                       ` David Woodhouse
2004-02-24 16:17                         ` Simon Haynes
2004-02-24 16:51                           ` David Woodhouse
2004-02-24 17:05                             ` Simon Haynes
2004-02-24 18:05                               ` David Woodhouse
2004-02-24 18:04                                 ` Simon Haynes
2004-02-25  9:49                                 ` simon
2004-02-25 10:25                                   ` David Woodhouse
2004-02-26 11:08                                     ` Simon Haynes
2004-02-26 11:55                                       ` David Woodhouse
2004-03-03 15:31                                       ` David Woodhouse
2004-03-08 15:10                                         ` Simon Haynes
2004-03-09 15:33                                           ` Simon Haynes
2004-03-16 16:14                                             ` David Woodhouse
2004-03-19 10:37                                               ` Simon Haynes
2004-03-19 11:11                                                 ` David Woodhouse
2004-02-24 17:12                             ` Simon Haynes
2004-02-24 16:55                           ` David Woodhouse
  -- strict thread matches above, loose matches on Subject: below --
2004-02-05 13:15 JFFS2 corruption Florian Schirmer
2004-02-08 10:37 ` David Woodhouse
2004-02-08 11:38   ` Florian Schirmer
2004-02-08 11:53     ` David Woodhouse
2004-02-08 17:02       ` Florian Schirmer
2004-02-08 17:13         ` David Woodhouse
2004-02-08 11:28 ` David Woodhouse

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=1077624009.7826.266.camel@hades.cambridge.redhat.com \
    --to=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=simon@baydel.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