Delayed writes on removed files

Chris Torek chris at mimsy.UUCP
Wed May 4 02:57:07 AEST 1988


>Amos Shapir <amos at taux01.uucp>:
>>... When a file is removed ... [and its] delayed write buffers are
>>reallocated, they will be written to the disk, even though their
>>contents are no longer relevant.

In article <13188 at brl-adm.ARPA> rbj at icst-cmr.arpa (Root Boy Jim) writes:
>I find this hard to believe.

Believe it.  In 4.3BSD, though, full blocks are written immediately;
only partial blocks are written with B_DELWRI.

>If there *are* blocks waiting to be read,

Not read---written.

>When the file *is* finally closed, ... the system should just ignore
>the delayed write flag and move the blocks to the free list.

It cannot; the blocks are tagged only by <dev,blkno> pairs, and
the truncation code does not search the cache for each such pair.

>Chris, say it ain't so!

(Why me?)

Anyway, given that writes on full blocks are started immediately
via bawrite() (see rwip(), when n+on==bsize), only partial block
delayed writes could be avoided, and these are probably rare.
Instead of trying to fix it, I say, wait for the `virtual memory
filesystem' in 4.4BSD.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.unix.wizards mailing list