linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Hans Jorgensen" <hans.jorgensen.news@gmail.com>
To: linux-mtd@lists.infradead.org
Subject: JFFS2, AT45DB642D dataflash and power failure
Date: Mon, 4 Jun 2007 08:28:50 +0200	[thread overview]
Message-ID: <646b5e90706032328i78c258f1ga27cd5ba92330b23@mail.gmail.com> (raw)

Can JFFS2 handle that an entire flash page gets corrupted if a power
failure occurs while calling at91_dataflash_write/dataflash_write? If
not then there might be a problem with
at91_dataflash.c/mtd_dataflash.c

The story is as following:
I am using Linux kernel 2.6.12 + patch 2.6.12 (20/06-2005) from
maxim.org.za and trying to implement transaction based file access
with rollback functionality in a user-space application.

To prove that it would work during power failure I used a watchdog to
activate reset of the CPU and flashes.  It did not work.

As an attempt to make it work I modified at91_dataflash_write to use
the flash commands.
Buffer 1 Write + Buffer 1 to Main Memory Page Program without Built-in Erase
instead of
Main Memory Page Program Through Buffer 1 (which implicit includes an
erase page functionality)

Now it is working and that naturally leads to the question above.
A nice side effect of this change is that writing speed is increased.

Note: this change may not be a valid solution, as this is not the
recommended way of using the dataflash. It would require further
investigation before implementation.

Hans

             reply	other threads:[~2007-06-04  6:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-04  6:28 Hans Jorgensen [this message]
2007-06-04  8:38 ` JFFS2, AT45DB642D dataflash and power failure Ivan Kuten
2007-06-05 15:28   ` Hans Jorgensen

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=646b5e90706032328i78c258f1ga27cd5ba92330b23@mail.gmail.com \
    --to=hans.jorgensen.news@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).