Complexity of reallocating storage (was users command crap)

Ian G Batten igb at fulcrum.bt.co.uk
Mon Feb 4 20:49:15 AEST 1991


In article <14994:Feb207:10:4791 at kramden.acf.nyu.edu>
brnstnd at kramden.acf.nyu.edu (Dan Bernstein) writes:

> 
> >    if (chdir(newsuid) == -1)
> >     {
> >      (void) mkdir(newsuid,0700);
> 
> This cannot fail unless some renegade sysadmin changes the mode of the

Ah!  I must go out and buy the patented ``Dan Bernstein never-fill''
file system, which has infinite data space and none of those nasty
limits of the number of inodes.  You can never, ever, in user space
ensure that you have space to do IO as there will always be a timing
window between your statfs (or whatever) and the actual IO.

> >    (void) chdir("..");
> 
> This is guaranteed to work.

Really.  Tell me about it.

It was some utility --- I forget what --- screaming ``can't find ..''
which alerted me on the occasion that a renegade disk controller sprayed
a data block accross a few directories on my news machine.  Seeing that
and rapidly shutting the machine down allowed me to rescue it.



More information about the Comp.bugs.4bsd.ucb-fixes mailing list