<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks everyone for your helpful comments.&nbsp; A couple of you were asking
about the hardware<br>
configuration and OS.&nbsp; I got a response from our hardware vendor that
answers these questions<br>
and sheds some light on the beating up on FLASH issue.<br>
<br>
- Ken Seehart<br>
<blockquote type="cite">
  <pre wrap="">Ken,

The Intel specification gives guarantied 100000 write cycle of the FLASH
memory.  The JFFS2 itself does have "wear leveling" built-in.  According to
the JFFS2 documentation it actually moves data around for each write to
achieve that.  It uses CRC check-sum to make sure data written is correct.
The reason we set up the RAM disk as the root file system instead of using
the JFFS2 straight as root file system is to minimize the write operation of
the OS to the FLASH memory. You need to calculate exactly how many writes
you need to do each hour and try to minimize the write operation as much as
possible to get best use of the FLASH memory.  You can find more information
about the JFFS2 at <a class="moz-txt-link-freetext"
 href="http://sourceware.org/jffs2/jffs2-html/">http://sourceware.org/jffs2/jffs2-html/</a>


Regards,

Zhong</pre>
</blockquote>
<br>
Aahz wrote:
<blockquote cite="mid20060725125516.GA15527@panix.com" type="cite">
  <pre wrap="">On Tue, Jul 25, 2006, Ken Seehart wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">My question is this: If I write a single byte to a file that contains
exactly one byte, can I be sure that a power outage during the write
will not render the file unreadable?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
No, you cannot be sure.  What I would do is keep the data in two
different directories; that makes it more likely that you'll be able to
recover your data.  Also, what OS are you using?  (Yes, I saw that it was
Linux, not all Linux is alike.)  You may be able to format the flash disk
with a filesystem that allows journaling.

Another point: I would use \x00 and \xFF for the byte.
  </pre>
</blockquote>
Rick Kwan wrote:
<blockquote
 cite="midf0aa69930607250656h3a01244cy5b74631b0affb4c4@mail.gmail.com"
 type="cite">Is this on top of JFFS2 sitting on top of an MTD-style
device?
  <br>
  <br>
I believe JFFS2 writes a new copy of the file somewhere, in many cases
  <br>
the end of the file system, not on top of the previous incarnation.
  <br>
But I would also like to hear a more authoritative answer.&nbsp; (I'm also
  <br>
doing embedded Linux and writing to flash, but building on someone
  <br>
else's work.)
  <br>
  <br>
--Rick Kwan
  <br>
</blockquote>
<br>
</body>
</html>