Re: Is there a "make hole" (truncate in middle) syscall?

Jörn Engel
2003-12-12T14:04:45Z

On Fri, 12 December 2003 16:52:43 +0300, Vladimir Saveliev wrote:
> On Fri, 2003-12-12 at 16:43, Jörn Engel wrote:
> > On Fri, 12 December 2003 16:28:18 +0300, Vladimir Saveliev wrote:
> > >
> > > Sorry,
> > > but doesn't truncate do almost exactly what "make hole" is supposed to
> > > do?
> >
> > Yeah, *almost* exactly. Some people happen to care about the almost.
> >
>
> I meant: where are those tons of problems (except for the fact that
> "make hole" is obviously something without which one can live just
> fine)?

Pretty much, yes. As hinted at before, holes are just special cases
of a more general problem, block pointer handling. On my hard drive,
there are literally millions of identical blocks. If the filesystem
knew about those, it throw away most of them and just point to the
blocks from different files (or maybe just file positions).

A hole is simply a file offset pointing to a special and very common
shared block, but there are many others.

Jörn

--
He that composes himself is wiser than he that composes a book.
-- B. Franklin