Whamcloud - gitweb
LU-8731 utils: propagate errors in lfs df 86/23286/3
authorJohn L. Hammond <john.hammond@intel.com>
Thu, 20 Oct 2016 16:52:44 +0000 (11:52 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 28 Oct 2016 23:50:41 +0000 (23:50 +0000)
commitbfd4600f31691fdad676a8489f591bccc24f2100
tree5e091bd023aea36909cf18098241ff31ae6c00a1
parentc791db551d022cd804e9dcc751cd7e33102a741a
LU-8731 utils: propagate errors in lfs df

Add llapi_obd_fstatfs() which does the same thing as
llapi_obd_statfs() but takes an open file descriptor instead of a
path. Refector the handler for 'lfs df' to use llapi_obd_fstatfs(),
thereby avoiding opening the mount point for each target and making
the error conditions easier to understand. Propagate errors from
llapi_obd_fstatfs() as the exit status of 'lfs df'.

In conf-sanity.sh test_64() allow 'lfs df' to fail when a target is
offline.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Iabfc92a65571b1a277de7fd42431f5b7e45ad440
Reviewed-on: http://review.whamcloud.com/23286
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Hongchao Zhang <hongchao.zhang@intel.com>
lustre/include/lustre/lustreapi.h
lustre/tests/conf-sanity.sh
lustre/utils/lfs.c
lustre/utils/liblustreapi.c