Create new files as sparse on NT systems. (2nd try)

Vaclav Haisman V.Haisman@sh.cvut.cz
Mon Feb 17 18:48:00 GMT 2003


> Btw, now that I've said that it occurred to me to check
> GetVolumeInformation.  There is apparently a FILE_SUPPORTS_SPARSE_FILES
> flag available.  That's the ultimate way to deal with this rather than
> adding a wincap, I believe.  Check (pc->fs.flags &
> FILE_SUPPORTS_SPARSE_FILES) in fhandler_disk_file::open and do the
> appropriate thing there.
>
> Sorry I didn't think of this before.
>
> cgf

I know about this flag and I have considered it when I started writing this
patch. It has one flaw. The volume of root of the path to the file doesn't have
to be the same volume as the file is physicaly stored on in case of reparse
points presence. Besides I don't see it as a problem if this call fails to set
the sparseness becase the file system doesn't support it.

Vaclav Haisman



More information about the Cygwin-patches mailing list