[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Major JFFS2 bug (?)
With JFFS2, if you are overwriting data to an existing file
and power crashes, you may endup with a file that has *some*
old data and *some* new data.
The "atomicity" of the write() with respect to power fail is
NOT guaranteed. I have proved this with JFFS2.
In my debate with Alan Cox, I argued for power fail safe write()'s.
Alan debated that the kernel should not gurantee that, and if the
user needs it, they need to handle it on their own.
You can reference the entire discussion on the JFFS archives, under the
same subject heading, starting last Sunday.
As of now, this is not being classified as a bug, but a known feature.
I was hoping that some other folks would pipe up re. this and their
expectations, but no one else has.
From: Bjorn Wesen
To: Vipin Malik
Cc: 'email@example.com '
Sent: 5/15/01 10:39 AM
Subject: Re: Major JFFS2 bug (?)
On Mon, 14 May 2001, Vipin Malik wrote:
> Any opinion on the lack of file *data* reliability in JFFS2 while
> overwriting an existing file vs file *system* reliability, which is
> guranteed by JFFS2, in the case of a power fail during write()?
If you write data into a file, the data either gets written or it
in JFFS1 at least. If you have a file of 1kb in length, and append
kb to it, either that kb (or a smaller amount) gets written or it
and in any case it does not affect the first kilobyte. You don't corrupt
data which the operation does not touch even if the operation crashes.
Same thing with replacements, although it's less than useful then to
that some bytes might have gotten replaced and some others might not.
To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to firstname.lastname@example.org