In looking at block layouts as part of fixing filesystem block
allocations under low free-space conditions (-r254995), determine that old block-preference search order used before -r249782 worked a bit better. This change reverts to that block-preference search order. MFC after: 2 weeks
This commit is contained in:
parent
28702816d8
commit
2ce451f089
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=254996
@ -1186,7 +1186,7 @@ ffs_dirpref(pip)
|
||||
if (fs->fs_contigdirs[cg] < maxcontigdirs)
|
||||
return ((ino_t)(fs->fs_ipg * cg));
|
||||
}
|
||||
for (cg = prefcg - 1; cg >= 0; cg--)
|
||||
for (cg = 0; cg < prefcg; cg++)
|
||||
if (fs->fs_cs(fs, cg).cs_ndir < maxndir &&
|
||||
fs->fs_cs(fs, cg).cs_nifree >= minifree &&
|
||||
fs->fs_cs(fs, cg).cs_nbfree >= minbfree) {
|
||||
@ -1199,7 +1199,7 @@ ffs_dirpref(pip)
|
||||
for (cg = prefcg; cg < fs->fs_ncg; cg++)
|
||||
if (fs->fs_cs(fs, cg).cs_nifree >= avgifree)
|
||||
return ((ino_t)(fs->fs_ipg * cg));
|
||||
for (cg = prefcg - 1; cg >= 0; cg--)
|
||||
for (cg = 0; cg < prefcg; cg++)
|
||||
if (fs->fs_cs(fs, cg).cs_nifree >= avgifree)
|
||||
break;
|
||||
return ((ino_t)(fs->fs_ipg * cg));
|
||||
|
Loading…
Reference in New Issue
Block a user