[LU-13687] interop: "lfs find" prints spurious "No such file or directory" error messages Created: 17/Jun/20 Updated: 09/Dec/20 Resolved: 13/Aug/20 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.14.0, Lustre 2.12.4 |
| Fix Version/s: | Lustre 2.14.0, Lustre 2.12.6 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Andreas Dilger | Assignee: | Andreas Dilger |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
v2_13_54-44-gf3fef81 |
||
| Issue Links: |
|
||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
When running "lfs find" it prints a spurious error message for each directory that it processes, and then appears to take the last argument "0" as the directory name when printing the summary error message: # lfs find /myth/tmp -size +100K --ost 0 lfs find: warning: /myth/tmp does not exist: No such file or directory (2) lfs find: warning: /myth/tmp/mythtv does not exist: No such file or directory (2) lfs find: warning: /myth/tmp/testdir does not exist: No such file or directory (2) /myth/tmp/pflfile2 /myth/tmp/40T : : error: find failed for 0. Reversing the order of the arguments prints the final error message correctly: # lfs find -size +100K --ost 0 /myth/tmp lfs find: warning: /myth/tmp does not exist: No such file or directory (2) lfs find: warning: /myth/tmp/mythtv does not exist: No such file or directory (2) lfs find: warning: /myth/tmp/testdir does not exist: No such file or directory (2) /myth/tmp/pflfile2 /myth/tmp/40T : : error: find failed for /myth/tmp. I suspect the "No such file or directory (2)" message may be incorrectly a result of getxattr() or IOC_MDC_GETFILEINFO on the file returning -ENOENT and that being printed rather than ignored? |
| Comments |
| Comment by Andreas Dilger [ 27/Jun/20 ] |
|
It may be that this is only happening when running a newer client (2.12.4+, 2.13.53+) against an older server. The error is being printed from get_lmd_info_fd(): 1863 if (dir_fd >= 0) { 1875 ret = ioctl(dir_fd, LL_IOC_MDC_GETINFO_V2, lmdbuf); 1927 if (ret && type == GET_LMD_INFO) { 1928 if (errno == ENOTTY) { 1948 } else if (errno == ENOENT) { 1949 ret = -errno; 1950 llapi_error(LLAPI_MSG_WARN, ret, 1951 "warning: %s does not exist", path); It seems that this is related to patch https://review.whamcloud.com/36609 " ll_dir_get_default_layout()) md_getattr failed on inode [0x200000007:0x1:0x0]: rc -2 ll_dir_get_default_layout()) Process leaving via out rc= -2 ll_dir_getstripe_default()) Process leaving rc= -2 ll_dir_ioctl()) Process leaving via out_req rc= -2 The FID [[0x200000007:0x1:0x0] is FID_SEQ_ROOT, so it is trying to get the default filesystem layout: int ll_dir_getstripe_default(struct inode *inode, void **plmm, int *plmm_size, struct ptlrpc_request **request, struct ptlrpc_request **root_request, u64 valid) { rc = ll_dir_get_default_layout(inode, (void **)&lmm, &lmm_size, &req, valid, 0); if (rc == -ENODATA && !fid_is_root(ll_inode2fid(inode)) && !(valid & (OBD_MD_MEA|OBD_MD_DEFAULT_MEA)) && root_request != NULL) rc = ll_dir_get_default_layout(inode, (void **)&lmm, &lmm_size, &root_req, valid, GET_DEFAULT_LAYOUT_ROOT); |
| Comment by Gerrit Updater [ 27/Jun/20 ] |
|
Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/39200 |
| Comment by Gerrit Updater [ 13/Aug/20 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39200/ |
| Comment by Mahmoud Hanafi [ 30/Oct/20 ] |
|
We are get error on lustre2.12.4. Can we get a backport of the patch. |
| Comment by Gerrit Updater [ 30/Oct/20 ] |
|
Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/40499 |
| Comment by Gerrit Updater [ 07/Nov/20 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/40499/ |