Whamcloud - gitweb
LU-11721 utils: print used inodes ratio when using "lfs df -i" 58/33758/6
authorNikitas Angelinas <nangelinas@cray.com>
Thu, 29 Nov 2018 23:23:05 +0000 (15:23 -0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 30 Jan 2019 02:40:26 +0000 (02:40 +0000)
commit757403191c37db75ed35b02c971846dced5d5119
tree195f4e23bce59155e2de69043aacd7bf84bf92c1
parentc61168239eff571aefc2a695ef12ae355230e611
LU-11721 utils: print used inodes ratio when using "lfs df -i"

"lfs df -i" prints the used blocks percentage, instead of the used
inodes percentage. Fix this by allowing obd_statfs_ratio() to
distinguish when "-i" is used.

Round up the ratio returned from obd_statfs_ratio() in a ceiling
manner, to match the output of df(1). Add a sanity test to check
that the outputs from df(1) and lfs df match.

Signed-off-by: Nikitas Angelinas <nangelinas@cray.com>
Cray-bug-id: LUS-6748
Test-Parameters: trivial
Change-Id: I0b31ecb7371875c93bc07dda1f1c89e04d5b4576
Reviewed-on: https://review.whamcloud.com/33758
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
lustre/tests/sanity.sh
lustre/utils/lfs.c