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)


[snip]

> >What kind of program would actually benefit from sparse
> files? And shouldn't
> >it be the responsibility of that program to request them?
>
> IIRC, linux creates sparse files automatically when you do an lseek to
> a position beyond EOF.  I believe that Windows is similar.
>

No, Windows does nothing like that.  On Windows, sparse files are completely
non-automatic:

"Note: It is up to the application to maintain sparseness by writing zeros
with FSCTL_SET_ZERO_DATA", sez the Platform docs.

Even if you do WriteFile()s with all zeros on a sparse file, you are
actually hitting the disk.

> I would like to see a benchmark but I doubt there will be any
> noticeable
> difference.

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.

--
Gary R. Van Sickle
Braemar Inc.
11481 Rupp Dr.
Burnsville, MN 55337


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