]> git.baikalelectronics.ru Git - kernel.git/commit
ufs: fix the logics for tail relocation
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 17 Jun 2017 19:44:06 +0000 (15:44 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 17 Jun 2017 21:22:42 +0000 (17:22 -0400)
commit2f6cfe42c365de6fc00becb1bcf9999885b7c81d
treecb2bc18c6c0e09e2af7f5bbc3ad007acc77c8ebf
parent28bcbda904ae68a814b1afe0704df6de6cd1655c
ufs: fix the logics for tail relocation

* original hysteresis loop got broken by typo back in 2002; now
it never switches out of OPTTIME state.  Fixed.
* critical levels for switching from OPTTIME to OPTSPACE and back
ought to be calculated once, at mount time.
* we should use mul_u64_u32_div() for those calculations, now that
->s_dsize is 64bit.
* to quote Kirk McKusick (in 1995 FreeBSD commit message):
    The threshold for switching from time-space and space-time is too small
    when minfree is 5%...so make it stay at space in this case.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ufs/balloc.c
fs/ufs/super.c
fs/ufs/ufs_fs.h