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

lfsck_layout_scan_stripes suspicious rc assignment

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.8.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      We seem to be having this sort of code there:

                      if (lso == NULL) {
                              struct lu_attr *attr = &info->lti_la;
      
                              rc = dt_attr_get(env, parent, attr);
                              if (rc != 0) {
                                      rc = PTR_ERR(lso);
                                      goto next;
                              }
      

      Now note that lso is already NULL - meaning we reset nonzero rc into zero in quite a roundabout way.
      Are you sure this is what was desired? I think we should just reuse the rc with the error instead?

      Attachments

        Activity

          [LU-7025] lfsck_layout_scan_stripes suspicious rc assignment

          Patch has landed for 2.8.

          jgmitter Joseph Gmitter (Inactive) added a comment - Patch has landed for 2.8.

          Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/16042/
          Subject: LU-7025 lfsck: Invalid return value assignment
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: 604c7396b25c8e3a8e3ecf415d9f6f2bf1cbc6fd

          gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/16042/ Subject: LU-7025 lfsck: Invalid return value assignment Project: fs/lustre-release Branch: master Current Patch Set: Commit: 604c7396b25c8e3a8e3ecf415d9f6f2bf1cbc6fd

          Fan Yong (fan.yong@intel.com) uploaded a new patch: http://review.whamcloud.com/16042
          Subject: LU-7025 lfsck: Invalid return value assignment
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: 91b228fa7fc04884848c4e4fb3407881626266ea

          gerrit Gerrit Updater added a comment - Fan Yong (fan.yong@intel.com) uploaded a new patch: http://review.whamcloud.com/16042 Subject: LU-7025 lfsck: Invalid return value assignment Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 91b228fa7fc04884848c4e4fb3407881626266ea

          People

            yong.fan nasf (Inactive)
            green Oleg Drokin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: