LU-9859 libcfs: open code cfs_trace_max_debug_mb() into cfs_trace_set_debug_mb()
This function in used twice.
In libcfs_debug_init() the usage is pointless as
the only place that set libcfs_debug_mb ensures
that it does not exceed the maximum. So checking
again can never help.
So open-code the small function into the only
other place that it is used - in cfs_trace_set_debug_mb(),
which is used to set libcfs_debug_mb.
HPC machines are being deployed with 24 TiB or more memory.
Change the variables uses to calculate the max_debug_mb
to unsigned long to avoid a potential overflow and change
80 / 100 scaling factors to 4 / 5.
Linux-commit:
5b5df84f3582b0e3a2ff70d49867bc3e03f67502
Change-Id: I497502bb7418e0b3d24b24c507029652bc9a9e55
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Reviewed-on: https://review.whamcloud.com/37829
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>