Subject: Re: Puzzling questions about FFS
To: Gordon Ross <gwr@mc.com>
From: Chris G. Demetriou <cgd@alpha.bostic.com>
List: tech-kern
Date: 10/31/1994 12:53:56
> > actually, depending on how the "write out the data blocks" portion is
> > done, you may end up with garbage, too...
> 
> I'm don't see how.  Can you enlighten?  The general rule for hardening
> is simply "write anything that is pointed at before the object that
> points to it".  With file updates, you can end up with a partial
> update, but you should never get random, old disk block contents.

i consider any file with contents different than what they should be
'garbage'.  i.e. if there's one byte different than i thought it
should be, then the file is basically unusable.  (that's pretty much
true for many types of files: binaries, gzip'd files, rcs archives...)

but that's what fsync(), et al. are for...


actually, i think my original thought may have been incorrect; what i
was thinking could only be a problem if you allocated _different_
blocks for successive data in a file than were already there, for some
of the blocks.  actually, with fragments, it's possible, i think...
(not really sure; my ignorance of FFS block allocation is showing...  8-)


chris