public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Sven <svenjaborek@gmx.de>
To: linux-mtd@lists.infradead.org
Subject: Re: JFFS2: truncated files after power loss scenario
Date: Sun, 06 Feb 2011 16:47:27 +0100	[thread overview]
Message-ID: <1297007247.2084.36.camel@hbox> (raw)
In-Reply-To: <1297005925.4460.41.camel@localhost>

Hi

> > I took a look at this, because we have seen a truncated configuration file once. I'm not sure what caused this. Perhaps a power loss during write.
> 
> How big was this file?

9445 bytes.

> > I wonder about the Inode #42 Version 5 to 9 and about why two Dirent exist(ed) for #ino 42.
> > Do you think this was caused by a power loss scenario?

> Please, give more information:
> 
> 1. Your flash type, if NAND - page size.

Need to check this. Page size is 128k i think.

> 2. What do you do to the file in your test - how exactly you change it.

I did two tests.
First one is a bash script running an endless loop. It creates new files
over and over by copying the 9445 bytes size file every time with a new
filename.
A power loss with this script running always produced the truncated last
file. It had the size of 4k or 8k then.

The second test reflects more our simple use case. A C-program which
uses fopen with "w+", and then uses GLib GKeyFile operations to modify a
key and then store the file again. An fclose follows of course.

> 3. How big is the file?
9445 bytes


Please, could you say something general about what the journaling in
jffs2+nand should be able to do about power loss scenarios? I could not
find specs about that.

br, Sven

  reply	other threads:[~2011-02-06 15:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-06 14:59 JFFS2: truncated files after power loss scenario Sven
2011-02-06 15:25 ` Artem Bityutskiy
2011-02-06 15:47   ` Sven [this message]
2011-02-06 16:03     ` Artem Bityutskiy
2011-02-06 17:12       ` Albrecht Dreß
2011-02-06 17:39         ` Artem Bityutskiy
2011-02-06 18:40           ` Albrecht Dreß
2011-02-11 14:00             ` Artem Bityutskiy

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=1297007247.2084.36.camel@hbox \
    --to=svenjaborek@gmx.de \
    --cc=linux-mtd@lists.infradead.org \
    /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