Whamcloud - gitweb
LU-4397 utils: fix lfs_df loop for disconnected client 49/8949/3
authorAndreas Dilger <andreas.dilger@intel.com>
Tue, 21 Jan 2014 21:25:56 +0000 (14:25 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 19 Apr 2014 04:04:40 +0000 (04:04 +0000)
commit4f965b8cff863334d536ec8a9806dba5eb10c62f
treed5593ada93e6efa5073a309f5987bce943473ac2
parent8106b747ad69f4cab7f893a8185353321213ec6f
LU-4397 utils: fix lfs_df loop for disconnected client

If the client is disconnected from the MDT on which "lfs df" is
run (typically MDT0 for the mountpoint), then the file open can
fail with -ESHUTDOWN, causing mntdf() to loop forever trying to
find other MDTs or OSTs to get statfs data from.

The caller of llapi_obd_statfs() cannot tell the difference between
an error from open() and ioctl(IOC_OBD_STATFS), so llapi_obd_statfs()
should return a fatal error if the open failed since all of the
later opens will fail as well.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I05d48d5b6680c382c9e05c02fd82a9a200500c1e
Reviewed-on: http://review.whamcloud.com/8949
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/utils/liblustreapi.c