sparse files
John R. Levine
johnl at esegue.segue.boston.ma.us
Fri Dec 15 02:58:33 AEST 1989
In article <11813 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn) writes:
>One problem with sparse files is that simply updating can result in an I/O
>failure if the original record overlapped a hole and the file system doesn't
>have any more free data blocks.
>
>I don't offer a solution for this, just a warning that even I/O operations
>that "can't" fail might, so applications should always check and be prepared
>to recover.
Given the traditional tendency for disks to fail at the least convenient
time in the least convenient way, one should be prepared for any write to
fail as a disk block that used to be good becomes bad. Doug's point is well
taken, though, since your error routine might be prepared for a write error
which makes a write() return -1, but not an out of space error which tends
to return a positive number less than the amount you wanted to write.
--
John R. Levine, Segue Software, POB 349, Cambridge MA 02238, +1 617 864 9650
johnl at esegue.segue.boston.ma.us, {ima|lotus|spdcc}!esegue!johnl
"Now, we are all jelly doughnuts."
More information about the Comp.unix.questions
mailing list