SPARSE files considered harmful - please revert

Lapo Luchini lapo@lapo.it
Sat May 24 09:21:00 GMT 2003


Rolf Campbell wrote:

>> 3) What no one seems to be mentioning is that we are trying to emulate
>> UNIX behavior here.  If the above is an issue for Windows then it could
>> also be an issue for UNIX.
>> cgf
>
> And it is. 

e.g. from FreeBSD 4.8's "man mmap":

   WARNING!  Extending a file with ftruncate(2), thus cre-
   ating a big hole, and then filling the hole by modify-
   ing a shared mmap() can lead to severe file fragmenta-
   tion.  In order to avoid such fragmentation you should
   always pre-allocate the file's backing store by
   write()ing zero's into the newly extended area prior to
   modifying the area via your mmap().  The fragmentation
   problem is especially sensitive to MAP_NOSYNC pages,
   because pages may be flushed to disk in a totally ran-
   dom order.

-- 
Lapo 'Raist' Luchini
lapo@lapo.it (PGP & X.509 keys available)
http://www.lapo.it (ICQ UIN: 529796)



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list