This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: Create new files as sparse on NT systems. (2nd try)
- From: "Max Bowsher" <maxb at ukf dot net>
- To: "Vaclav Haisman" <V dot Haisman at sh dot cvut dot cz>,<cygwin-patches at cygwin dot com>
- Date: Wed, 19 Feb 2003 00:27:04 -0000
- Subject: Re: Create new files as sparse on NT systems. (2nd try)
- References: <20030219010610.Y52168-100000@logout.sh.cvut.cz>
Vaclav Haisman wrote:
> 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 systems.
>
>> 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.
Could you do some tests, so we have more than conjecture to go on?
What programs actually *benefit* from sparseness?
Max.