Whamcloud - gitweb
LU-17245 utils: fix lfs error messages with multiple paths 42/52942/3
authorThomas Bertschinger <bertschinger@lanl.gov>
Tue, 31 Oct 2023 19:59:18 +0000 (13:59 -0600)
committerOleg Drokin <green@whamcloud.com>
Wed, 3 Jan 2024 03:02:47 +0000 (03:02 +0000)
commit0d5f685d036c32f47cf837c1fb0894a41212898f
tree80b71e7109a35f466313b34abffe7b776a381136
parentd0a968312aab883e4a0b3f40816e881b93b9dd2c
LU-17245 utils: fix lfs error messages with multiple paths

When using some lfs utilities (find, getstripe) with multiple paths,
if a subset of the paths has an error, for example due to a typo, the
error message produced can be misleading. For "getstripe" it refers to
the last file on the command line regardless of which file had the
error, and for "find" it prints out the right filename but uses
the error code from the last file on the command line.

This cleans up these error messages for "lfs find" and
"lfs getstripe".

This also adjusts "lfs setdirstripe" to continue for subsequent files
if it encounters an error for earlier files on the command line.

Signed-off-by: Thomas Bertschinger <bertschinger@lanl.gov>
Fixes: bc500536b6dd ("LU-930 utils: fix 'lfs find' error message")
Fixes: 4affa48f676b ("LU-5170 utils: Continue on error when multiple files requested")
Fixes: a24f61532927 ("LU-11213 dne: add new dir hash type "space"")
Change-Id: I9cdd007912ffb4f6ebc31e422851977e49186ae7
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52942
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity.sh
lustre/utils/lfs.c