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 Mon, Feb 17, 2003 at 05:37:20PM +0100, Vaclav Haisman wrote:
>> I have prepared another patch that implements sparse files for
>> Cygwin. It is smaller and, I think, even better than the previous.
>> No new CYGWIN options.

>> 2003-02-17  Vaclav Haisman  <V.Haisman@sh.cvut.cz>
>>
>> * include/winioctl.h (FSCTL_SET_SPARSE): Define.
>>
>> 2003-02-17  Vaclav Haisman  <V.Haisman@sh.cvut.cz>
>>
>> * fhandler.h: Include winioctl.h for DeviceIoControl.
>> (fhandler::open): Try to set newly created and truncated files as
>> sparse on NT systems.


Christopher Faylor wrote:
> This looks pretty good but the cygwin convention is to use wincap
> settings for this kind of thing rather than using is_winnt.  So,
> please add a wincap capability to accomplish this.


Is it wise to set *all* new files to sparse? Surely if this was actually
advantageous, Windows would do it anyway? From MSDN: "Note  It is up to the
application to maintain sparseness by writing zeros with
FSCTL_SET_ZERO_DATA." I.e., this will gain nothing unless the application
knows about sparse-ness, in which case, it should explicitly specify that
the file should be sparse. So, all this patch will do is to force Windows to
examine more metadata for every file read. This seems *extremely
undesirable*.

Max.


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