Subject: Re: unintended consequences of ffs_dirpref()?
To: Jason R Thorpe <thorpej@zembu.com>
From: Bill Sommerfeld <sommerfeld@netbsd.org>
List: tech-kern
Date: 01/16/2001 14:46:23
> > Thoughts?
>
> Yes. How about doing the loop twice -- if you don't find anything
> the first time, then do it again without checking cs_nbfree.
How about, instead:
- scan once looking for cs_nbfree > 0; return best found if any
- scan once looking for cs_nffree > 0; return best found if any
- return 0; mkdir will fail because the disk is full.
This has the advantage that the second pass will not pick a completely
full cylinder group..
- Bill