Whamcloud - gitweb
LU-10986 lfs: make lfs project tolerant errors 43/32243/16
authorWang Shilong <wshilong@ddn.com>
Wed, 2 May 2018 08:54:15 +0000 (16:54 +0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 18 Jul 2018 05:59:39 +0000 (05:59 +0000)
commitd189024bd3065c69c51ba90f6228c3ea28419dd0
tree9c4ea6f3f22b99d30a6405f0046ccea64755076b
parent04585d02d1e175cb74254c58ee65291ff707a888
LU-10986 lfs: make lfs project tolerant errors

This patch try to fix following problems:
1)command hang on pipe file, reproduced by following steps:
 $ mkfifo tmp/pipe
 $ lfs project -srp 500 tmp -->this will never finish.

Problem is opening a pipe file will be blocked in default
without O_NOBLOCK or O_NODELAY flag.

2)If a symbolic link with missing target exists, command
returns error and does not process remaining entries.

we should fix this problem by allowing command process
further even it hit some errors.

3)fix a wrong check for MAX_PATH.

Test-Parameters: trivial testlist=sanity-quota,sanity-quota
Change-Id: I7d08a7547e6b1351a1eff23063da6cd9c4cdc5e3
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/32243
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yingjin Qian <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-quota.sh
lustre/utils/lfs_project.c