smarter sparse files?

Andreas Dilger adilger at
Tue Nov 15 19:28:59 UTC 2005

On Nov 08, 2005  18:09 -0800, Rasmus Munk Larsen wrote:
> Question: Does ext2/3 (or any other filesystem you know of) support
> a system call turning blocks within a file back into "sparse zeros", 
> i.e. giving the blocks back to the filesystem? 

This is something that was implemented a long time ago, called "punch"
but never integrated into the core kernel.  It is essentially a form
of truncate that has an "end" parameter instead of removing all blocks
until EOF.

Implementing this is quite complex and I imagine it is much more complex
now than when we did it (maybe 1.2.x kernel days).  However, I believe
it is a useful interface and I think it would be used if it were available.

Cheers, Andreas
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.

More information about the Ext3-users mailing list