This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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
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.

Vaclav Haisman


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]