[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: power safe - appand to file
On Wed, 2004-05-26 at 09:53 +0200, Niels Beier (NB) wrote:
> I have two questions regarding the power safe features of JFFS2 (JFFS2 on eCos).
> 1) As I understand it, JFFS2 (being a journaling file system and not a versioning file system) only
> protects the integrity of the file system and not the integrity of the file content. We need
> to be able to append new data to an existing file (a system log file in an embedded device) and it is important
> that the file is not corrupted if the power is removed during the append operation.
> Is the append file operation safe (is the old data still available if the de power is removed during
> the append operation)?
Of course the _old_ data are available. Some of the new data may also be
available. See POSIX.
> 2) We need to be able to update the firmware of an embedded device in a safe manner.
> After we have downloaded new firmware using a another name (old firmware filename : firware_old- new
> firmware filename: firmware_new), how do we then change the name of firware_new to firmware_old (our
> boot process expects to find a file called firmware_old) in a power safe way (if this is not possible we must
> change our boot proces)?
Rename is atomic. See POSIX.
To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to email@example.com