[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: power safe - appand to file



Hi David,
 I have a doubt to ask you at this moment. I have a system with Linux
2.4.19 along with JFFS2 file system. But what I saw is that while saving
some configuration parameters to a file, the file system gets corrupted
and we rebooted the system, the kernel could not find(mount) the file
system and some error was coming. I donít exactly remember the error,
but what I remember is that it was related to Super node of the file
system. Hope to get some feedback from you regarding this. Thanks in
advance
Banajit Goswami

-----Original Message-----
From: owner-jffs-dev@xxxxxxx.com">mailto:owner-jffs-dev@xxxxxxx.com] On Behalf
Of David Woodhouse
Sent: Wednesday, May 26, 2004 2:32 PM
To: Niels Beier (NB)
Cc: jffs-dev@xxxxxxx.com
Subject: Re: power safe - appand to file


On Wed, 2004-05-26 at 09:53 +0200, Niels Beier (NB) wrote:
> Hi,
> 
> 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.

-- 
dwmw2


To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo@xxxxxxx.com



To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo@xxxxxxx.com