From: Slava, Alex (raf.devel_at_[hidden])
Date: 2006-05-25 04:35:07
> > More realistic feature request would be support
> > for sparse files.
> > The empty areas could be used for appending
> > new data efficiently, normal operations on RAF
> > should ignore then.
> > Support for sparse files is available in Win32 via
> > DeviceIoControl(FSCTL_QUERY_ALLOCATED_RANGES).
> > I have vague feeling Linux has something like that too.
> ZFS on Solaris 10 has an extension to the the Posix lseek() flags, SEEK_DATA
> and SEEK_HOLE. It makes it easy to find the holes in your files. I may be
> wrong here but I don't think Linux supports this.
Sparce file handling was described in Kernighan book more then 20
years ago. I think that most UNIX-systems produces "holes" by default
(Linux do this on ext2/ext3 and XFS for sure). It is not a problem to
RAF. It just ask a system to allocate space and it is not important
whether the data allocated or "hole" created. when writing in the
"hole" system will allocate blocks for a file. There may be a problem
that there is no more space on device, exactly such case is descried
in MSDN (using memory-maped file on sparce or comprressed file). We
will just check for an error in such cases.
-- Svyatoslav Trukhanov, Oleksii Ursulenko
Boost list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk