On Jan 14, 2008 11:09 AM, Oren Beck <
orenbeck@gmail.com> wrote:
Accumulate write counts to a buffer in session ram- and write to flash
only as part of unmount, or shutdown where unmount was not explicit but
presumed.
That shouldn't be necessary. Internally, flash drives save information along with each data block that isn't presented via the USBMSD interface. When I write Sector X of a filesystem to the flash drive, it doesn't always write the same physical location. Instead, it writes the new version of that sector to another location, and has some way of knowing which version is current. I don't know the internals, but it's probably using some kind of serial number that increments with each write.
At least that's how I would implement something like that. The device should be able to non-destructively determine how many sector writes it has performed, and how many sectors are nearing the expected lifetime.