Re: Sync option destroys flash!

Alan Cox
2005-05-13T18:53:52Z

> What happens, with the sync option on a VFAT file system, is that the
> FAT tables are getting pounded and over-written over and over and over
> again as each and every block/cluster is allocated while a new file is
> written out. This constant overwriting eventually wears out the first
> block or two of the flash drive.

All non-shite quality flash keys have an on media log structured file
system and will take 100,000+ writes per sector or so. They decent ones
also map out bad blocks and have spares. The "wear out the same sector"
stuff is a myth except on ultra-crap devices.

> I'm also going to file a couple of bug reports in bugzilla at RedHat
> but this seems to be a more fundamental problem than a RedHat specific
> problem. But, IMHO, they should never be setting that damn sync flag
> arbitrarily.

It sounds like your need to find a vendor who makes decent keys. For
that matter several vendors now offer life time guarantees with their
USB flash media.

Sync gets set by RH because it seemed the right thing to do to handle
random user device pulls. Now O_SYNC works so excessively well on
fat/vfat that needs looking at - and as you say likewise perhaps the
nature of the FAT rewriting.

However its not a media issue, its primarily a performance issue.

Alan