On Fri, Jul 11, 2003 at 11:32:12AM -0500, Eli Carter wrote: > I'm trying to understand what the .truncate method is supposed to do > when the file size is extended. (Using 2.5.68-rmk1) truncate(2) is dark magic and a source of frequent problems. If I recall, posix doesn't say -what- is supposed to happen with truncate making files larger. It can range from unsupported entirely, to filling with garbage, to filling with zeros, which is what I think linux -likes- to do. However, some filesystems (xfs) have their own methods for acheiving similar goals, and historically haven't always given zero filled pages back, for speed reasons. In short: i think your filesystem can do whatever it damn well pleases. It might even be configurable. But, relying on any specific behavior in applications is outright wrong... I hope this helps explain it a bit.. -- "It seems the power has been robbed from the founding fathers and is now firmly in the hand of the funding fathers." -- Rik van Riel
Attachment:
pgp00474.pgp
Description: PGP signature