Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-13687

interop: "lfs find" prints spurious "No such file or directory" error messages

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.14.0, Lustre 2.12.6
    • Lustre 2.14.0, Lustre 2.12.4
    • None
    • v2_13_54-44-gf3fef81
    • 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?

      Attachments

        Issue Links

          Activity

            [LU-13687] interop: "lfs find" prints spurious "No such file or directory" error messages

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/40499/
            Subject: LU-13687 llite: return -ENODATA if no default layout
            Project: fs/lustre-release
            Branch: b2_12
            Current Patch Set:
            Commit: 41dfe594d2a0b93fe8c54fed049526b60332515a

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/40499/ Subject: LU-13687 llite: return -ENODATA if no default layout Project: fs/lustre-release Branch: b2_12 Current Patch Set: Commit: 41dfe594d2a0b93fe8c54fed049526b60332515a

            Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/40499
            Subject: LU-13687 llite: return -ENODATA if no default layout
            Project: fs/lustre-release
            Branch: b2_12
            Current Patch Set: 1
            Commit: 44bc69bd443eb24802572668ca84f831491f0337

            gerrit Gerrit Updater added a comment - Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/40499 Subject: LU-13687 llite: return -ENODATA if no default layout Project: fs/lustre-release Branch: b2_12 Current Patch Set: 1 Commit: 44bc69bd443eb24802572668ca84f831491f0337

            We are get error on lustre2.12.4. Can we get a backport of the patch.

            mhanafi Mahmoud Hanafi added a comment - We are get error on lustre2.12.4. Can we get a backport of the patch.

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39200/
            Subject: LU-13687 llite: return -ENODATA if no default layout
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 7fb17eb7b7e6035931987ae1e9589639114d210e

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39200/ Subject: LU-13687 llite: return -ENODATA if no default layout Project: fs/lustre-release Branch: master Current Patch Set: Commit: 7fb17eb7b7e6035931987ae1e9589639114d210e

            Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/39200
            Subject: LU-13687 llite: return -ENODATA if no default layout
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: d6564d6ea6cd250954d1c21ab6149584608536f8

            gerrit Gerrit Updater added a comment - Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/39200 Subject: LU-13687 llite: return -ENODATA if no default layout Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: d6564d6ea6cd250954d1c21ab6149584608536f8
            adilger Andreas Dilger added a comment - - edited

            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 "LU-11656 llite: fetch default layout for a directory", since the error is returned from code added in that patch:

            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);
            
            adilger Andreas Dilger added a comment - - edited 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 " LU-11656 llite: fetch default layout for a directory ", since the error is returned from code added in that patch: 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);

            People

              adilger Andreas Dilger
              adilger Andreas Dilger
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: