Merge "Relax inode usage estimate."
This commit is contained in:
commit
5ebe28c1d4
|
@ -73,9 +73,9 @@ def GetInodeUsage(path):
|
||||||
"""
|
"""
|
||||||
cmd = ["find", path, "-print"]
|
cmd = ["find", path, "-print"]
|
||||||
output = common.RunAndCheckOutput(cmd, verbose=False)
|
output = common.RunAndCheckOutput(cmd, verbose=False)
|
||||||
# increase by > 4% as number of files and directories is not whole picture.
|
# increase by > 6% as number of files and directories is not whole picture.
|
||||||
inodes = output.count('\n')
|
inodes = output.count('\n')
|
||||||
spare_inodes = inodes * 4 // 100
|
spare_inodes = inodes * 6 // 100
|
||||||
min_spare_inodes = 12
|
min_spare_inodes = 12
|
||||||
if spare_inodes < min_spare_inodes:
|
if spare_inodes < min_spare_inodes:
|
||||||
spare_inodes = min_spare_inodes
|
spare_inodes = min_spare_inodes
|
||||||
|
|
Loading…
Reference in New Issue