[Baypiggies] File IO question
ken at seehart.com
Wed Jul 26 04:06:21 CEST 2006
Ouch. I had not considered that. I didn't know FLASH was so fragile.
Mike Cheponis wrote:
> Bryan is right.
> I suggest you glue on a piece of battery-backed (or super-cap-backed) SRAM for your semaphore, or maybe use FRAM:
> You definitely don't want to beat on the flash FS too much...
> On Tue, 25 Jul 2006, Bryan O'Sullivan wrote:
>> Date: Tue, 25 Jul 2006 10:53:21 -0700
>> From: Bryan O'Sullivan <bos at serpentine.com>
>> To: davidoff56 at alluvialsw.com
>> Cc: baypiggies at python.org
>> Subject: Re: [Baypiggies] File IO question
>> 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.
> Baypiggies mailing list
> Baypiggies at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Baypiggies