From: Artem Bityutskiy <dedekind1@gmail.com>
To: Sven <svenjaborek@gmx.de>
Cc: linux-mtd@lists.infradead.org
Subject: Re: JFFS2: truncated files after power loss scenario
Date: Sun, 06 Feb 2011 17:25:25 +0200 [thread overview]
Message-ID: <1297005925.4460.41.camel@localhost> (raw)
In-Reply-To: <1297004384.2084.9.camel@hbox>
On Sun, 2011-02-06 at 15:59 +0100, Sven wrote:
> Hi mtd list,
>
> What is the expected behavior for files beeing written on a jffs2 (on
> nand) during a power loss? Would an incomplete file exist, or would the journaling do a roll back
> because of an incomplete transaction?
> Is there a difference with new files created, or existing files beeing modified?
>
> My tests show that on next bootup the file exists, but is truncated. I have not seen any journaling related roll backs.
>
> 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?
> 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?
No, this is how JFFS2 works, this is related to the design. In short,
only v9 is valid, other versions are invalid, you can ignore them.
> The truncated file error happened on a 2.6.18 based kernel.
> I have done power loss tests on 2.6.34, which showed truncated files as well.
Please, give more information:
1. Your flash type, if NAND - page size.
2. What do you do to the file in your test - how exactly you change it.
3. How big is the file?
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
next prev parent reply other threads:[~2011-02-06 15:26 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 [this message]
2011-02-06 15:47 ` Sven
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=1297005925.4460.41.camel@localhost \
--to=dedekind1@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=svenjaborek@gmx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.