This is the mail archive of the
mailing list for the Cygwin project.
RE: Create new files as sparse on NT systems. (2nd try)
- From: Vaclav Haisman <V dot Haisman at sh dot cvut dot cz>
- To: cygwin-patches at cygwin dot com
- Date: Wed, 19 Feb 2003 01:21:14 +0100 (CET)
- Subject: RE: Create new files as sparse on NT systems. (2nd try)
On Tue, 18 Feb 2003, Gary R Van Sickle wrote:
> "Note: It is up to the application to maintain sparseness by writing zeros
> with FSCTL_SET_ZERO_DATA", sez the Platform docs.
In this respect Windows are ahead of any recent Unix system. I wasn't able find
any Unix/Posix syscall that would allow this unlike Windows.
> Even if you do WriteFile()s with all zeros on a sparse file, you are
> actually hitting the disk.
Have you ever tryed the same thing in Unix environment? Writing buffer full of
zeros with write syscall won't gain you anything either. All the zeros will be
physicaly written onto the disk. This means it has the same behaviour as Unix
> The only thing this patch will do AFAICS is set a bit somewhere in the guts
> of NTFS that will be pretty much ignored. I'm with Max, I don't see the
> benefit and can only imagine the consequences.
I don't see any negative consequences of this patch. The only one I can imagine
it can slow down file operations but I very very doubt it.