Subject: Re: truncate()
To: Paul Kranenburg <pk@cs.few.eur.nl>
From: Chris Torek <torek@horse.ee.lbl.gov>
List: tech-kern
Date: 11/06/1993 08:03:50
In 4.4, truncate (which is now misnamed) will increase a file's
size. (It would be nice to get the system call renamed ... but then,
O_CREAT is still spelled without its final E. :-) )
The code for extending a file is tricky. It took a couple of rounds
(with some nasty little fs problems) to get this to work right. If
you extend a block in place, you must zero out the new parts; if you
grow a file beyond the `small file' size, you must extend its final
fragment, if any, to a full block.
------------------------------------------------------------------------------