This is the mail archive of the cygwin@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: SPARSE files considered harmful - please revert


On Mon, May 19, 2003 at 03:47:32PM +0100, Max Bowsher wrote:
> Bill C. Riemers wrote:
> > Only executable files should be sparse files...  Under Linux, the
> executable
> > bit is checked by cp.  (Or at least this was true several years ago, when
> I
> > last looked at the code.)  Only if the file is marked as executable is it
> > possibly made sparse.
> 
> I haven't looked in the code, but there is absolutely no mention of this in
> the man page.

... and the non-executable file /var/log/lastlog can cause big trouble if it
isn't sparse.
 
> > Granted sometimes you do have a data file which can be made sparse.
> > However, unless you are familiar with the code used to read the file, this
> > is very dangerous.  So this should be decided on a case by case basis.
> 
> Um? By my understanding, making a file sparse can never be dangerous. It can
> cause sub-optimal performance, but code reading the file doesn't have to be
> aware of anything special - the OS takes care of it.
>
Agree. Something along the lines of Martin Buchholz's suggestion makes sense:
make the file sparse when writing after a seek past the end of file. 
There is already support to detect that condition, to handle the win95 lseek
bug.

Pierre

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


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