On Wed, Aug 20, 2008 at 05:49:10PM -0700, Paul G. Allen wrote:
No matter what safeguards are put in place, no file system is ever going to be 100% safe from corruption from a power interruption. I spent years on trying to bet embedded file systems as close to 100% safe as possible. There is always going to be some case where something gets corrupted when power drops at the wrong time.
Unexpected power failures can be fully guarded against, at least with predictable hardware, such as flash. It's a lot harder with harddrives. Of course, I guess to some extent what you are saying is true. Even the journal will be protected by some kind of checksum, ECC, CRC or hash. So, for example, ZFS could mis-read data 1 out of ever 2^256 power failures. Since this isn't likely to occur before the heat death of the universe, it isn't usually considered to fall under most definitions of "possible". Most embedded systems use smaller checksums, so might indeed fail in shorter timeframes than hundreds of billions of years. I've spent a good portion of my career implementing a reliable embedded filesystem. We used an off-target simulator that could simulate all possible power failure timings, and any corruption, ever, was considered a bug that needed to be fixed. It's hard, but possible. David -- KPLUG-List@kernel-panic.org http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list