Whamcloud - gitweb
LU-11157 obd: round values to nearest MiB for *_mb syfs files 17/34317/16
authorJames Simmons <uja.ornl@yahoo.com>
Tue, 30 Apr 2019 13:17:56 +0000 (09:17 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 10 May 2019 07:12:15 +0000 (07:12 +0000)
commitba2817fe3ead1b8e32be6d6c6ce25b490626118a
tree45f8fa0387b571f80ca19a8cc7592d2d5712516a
parent743b85a32e24cff0c77dff739691043970a0901e
LU-11157 obd: round values to nearest MiB for *_mb syfs files

Several sysfs files report their settings with the functions
lprocfs_[seq]_read_frac_helper() which has the intent of showing
fractional values i.e 1.5 MiB. This approach has caused problems
with shells which don't handle fractional representation and the
values reported don't faithfully represent the original value the
configurator passed into the sysfs file. To resolve this lets
instead always round up the value the configurator passed into
the sysfs file to the nearest MiB value. This way it is always
guaranteed the values reported are always exactly some MiB value.

Change-Id: Ia2e8cf8421784853aa33d4bb87c54aee00953835
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/34317
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lprocfs_status.h
lustre/llite/llite_internal.h
lustre/llite/lproc_llite.c
lustre/mdc/lproc_mdc.c
lustre/obdclass/lprocfs_status.c
lustre/osc/lproc_osc.c