here's a description of SEEK_HOLE and its companion SEEK_DATA
o If whence is SEEK_HOLE, the offset of the start of the
next hole greater than or equal to the supplied offset
is returned. The definition of a hole is provided near
the end of the DESCRIPTION.
o If whence is SEEK_DATA, the file pointer is set to the
start of the next non-hole file region greater than or
equal to the supplied offset.
they are optimzations to aid in the discovery of holes on the read side
I believe the issue is not whether the ast code faithfully reproduces holes
when copying files (although the ast code may convert runs of 0's in real data
to holes), but rather:
(1) ast stdio should support SEEK_HOLE+SEEK_DATA for compatibility
(2) ast sfio should probably do the same
(3) the efficiency of the current ast hole discovery code
On Mon, 10 Aug 2009 09:46:19 -0400 David Korn wrote:
> > Roland, Glenn,
> > FYI Solaris 11 stdio and /usr/bin/cp/mv support SEEK_HOLE but libast
> > stdio, SFIO and AST cp/mv do not support SEEK_HOLE.
> >
> > Irek
> The libast stdio creates holes whenever possible when writing to a file.
> Blocks containing all 0's are not written and instead seek is called
> to skip over them.
> There is not explicit option, but if you start with a file with holes
> and run cp, the new file will also have holes.
> David Korn
> [email protected]
> _______________________________________________
> ast-developers mailing list
> [email protected]
> https://mailman.research.att.com/mailman/listinfo/ast-developers
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers