[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Major JFFS2 bug (?)
Alan put this exactly right. POSIX does not require this. The overhead
would be very large. This should be handled as passwd handles it:
write changed date to foo.new
mv foo.new to foo
The mv should be atomic on JFFS2. It would be useful for someone to
build a test script to insure that this is the case. Ie: after a power
cycle you either have all of foo.new in foo or the old foo. There should
never be a mix according to dwmw2's comments as to how this is
passwd does this for the same reasons you specify. Any other correctly
written POSIX app should do this the same way and be ok.
Vipin Malik wrote:
> 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.
Tim Riker - http://rikers.org/ - short SIGs! <g>
All I need to know I could have learned in Kindergarten
... if I'd just been paying attention.
To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to email@example.com