Whamcloud - gitweb
LU-13683 lfs: return -ENOENT when invoked on non-existing file 09/40709/3 b2_12
authorSebastien Piechurski <sebastien.piechurski@atos.net>
Tue, 16 Jun 2020 16:14:55 +0000 (18:14 +0200)
committerOleg Drokin <green@whamcloud.com>
Tue, 27 Feb 2024 05:48:09 +0000 (05:48 +0000)
commit80e9ebc1b1e44069f058d0ee81f0fd871b8f8748
tree40423238b35442099adc869799335bcec272d82d
parent1fa6738b6dd56660058cb146629f0d23e36cdc1d
LU-13683 lfs: return -ENOENT when invoked on non-existing file

Since merge of LU-11510, lfs migrate on a non-existing file will give
the following error "lfs migrate: can't create composite layout from
file /some/path/to/file" and will exit with code 0, potentially
leaving a calling script unaware of the error.

This patch fixes it by using errno which is set in the call to
llapi_layout_get_by_path()

Lustre-change: https://review.whamcloud.com/38953
Lustre-commit: 52d7cb5913c1e653a89d3a4de5f39c0e596dd28c

Signed-off-by: Sebastien Piechurski <sebastien.piechurski@atos.net>
Change-Id: I910eae78445f6071ff4e741afd43d140f554ab22
Fixes: 8bedfa377fbd ("LU-11510 lfs: migrate a composite layout file correctly")
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/40709
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Gian-Carlo DeFazio <defazio1@llnl.gov>
lustre/utils/lfs.c