[Baypiggies] File IO question
Bryan O'Sullivan
bos at serpentine.com
Tue Jul 25 19:53:21 CEST 2006
On Tue, 2006-07-25 at 10:32 -0700, Monte Davidoff wrote:
> 1. Write new data file.
> 2. Invoke /bin/sync to ensure the new data file is written to disk, if
> shelve did not take care of this already.
Just use os.fsync(fp.fileno()).
> I'm also working on an embedded Linux application that writes to a flash
> drive. To get journaling, I've used XFS on the flash drive, although I
> have not tried JFFS2.
This is not a very good idea. Linux's flash filesystems are designed
specifically to limit the number of write cycles they make to any given
region of memory ("wear leveling"), which disk-oriented filesystems do
not need to worry about. You'll significantly reduce the usable
lifetimes of your flash devices if you use an inappropriate filesystem.
Also, XFS is enormous, hardly a good fit for a presumably
resource-constrained embedded system.
<b
More information about the Baypiggies
mailing list