public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Peter Menzebach <pm-mtd@mw-itcon.de>
To: Steven Scholz <steven.scholz@imc-berlin.de>
Cc: linux-mtd@lists.infradead.org
Subject: Re: Do I have to umount JFFS2?
Date: Mon, 19 Dec 2005 08:52:55 +0100	[thread overview]
Message-ID: <43A666D7.5040107@mw-itcon.de> (raw)
In-Reply-To: <43A57B60.9090203@imc-berlin.de>

Steven Scholz wrote:
> Peter,
> 
>>> Didnt get this comment of ur's :
>>> 1. Single files can be still corrupted, when you write them and press
>>> reset.
>>>
>> When you press reset, when a file is written, you get a partly written
>> block. So you get a file, which is not written completely. This
>> corruption is detected by jffs2 and issues warnings. The filesystem as
>> whole stays intact, but the file as such doesn't have the contents you
>> might expect.
> 
> Since you're talking about "pressing reset" I have to ask again.
> 
> When we do a firmware update of our devices we do something like
> 
>  cp /tmp/large_file /opt/imc/application
>  reboot
> 
> where /tmp is a ramdisk and / a jffs2 rw rootfs.
> 
> So we're not pressing reset but doing a reboot. And I wanted to know if
> linux does only reboot _after_ all data is correctly written to flash?
> 
> Would it make sense to do
> 
>  cp /tmp/large_file /opt/imc/application
>  sync
>  reboot
> 
> ???
> 
> What's the point of having a line
> 
> ::shutdown:/bin/umount -a -r
> 
> in /etc/inittab?
> 
> I have
> 
> /dev/mtdblock0 on / type jffs2 (rw,noatime)
> /proc on /proc type proc (rw,nodiratime)
> devpts on /dev/pts type devpts (rw)
> sysfs on /sys type sysfs (rw)
> /dev/shm on /var type tmpfs (rw)
> /sys/kernel/debug on /var/tmp/debug type debugfs (rw)
> 
> So the only real fs is jffs2. Does it help to unmount it before reboot?
> 
> --
> Steven
> 
> 
Hi Steven,
I have not verified this in code, but afaik there is no automatic 
unmount of the filesystems at remount.

So you should either call sync or unmount the filesystem (which calls 
implicit a sync)

Best regards
Peter


-- 
Peter Menzebach
Menzebach und Wolff IT-Consulting GbR
Phone +49 751 355 387 1

      reply	other threads:[~2005-12-19  7:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-15 10:12 Do I have to umount JFFS2? Steven Scholz
2005-12-15 10:26 ` Jarkko Lavinen
2005-12-15 12:25   ` Steven Scholz
2005-12-15 12:51     ` Peter Menzebach
2005-12-16  2:16       ` alfred hitch
2005-12-16  9:10         ` Peter Menzebach
2005-12-16 16:36           ` alfred hitch
2005-12-16 16:54             ` Peter Menzebach
2005-12-18 15:08               ` Steven Scholz
2005-12-19  7:52                 ` Peter Menzebach [this message]

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=43A666D7.5040107@mw-itcon.de \
    --to=pm-mtd@mw-itcon.de \
    --cc=linux-mtd@lists.infradead.org \
    --cc=steven.scholz@imc-berlin.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