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

redundant rc check in lprocfs_client_fid_width_seq_write

Details

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

    Description

      There is a bit of strange code in lprocfs_client_fid_width_seq_write():

              rc = lprocfs_write_helper(buffer, count, &val);
              if (rc) {
                      mutex_unlock(&seq->lcs_mutex);
                      RETURN(rc);
              }
      
              if (seq->lcs_type == LUSTRE_SEQ_DATA)
                      max = LUSTRE_DATA_SEQ_MAX_WIDTH;
              else
                      max = LUSTRE_METADATA_SEQ_MAX_WIDTH;
      
              if (val <= max && val > 0) {
                      seq->lcs_width = val;
      
                      if (rc == 0) {
                              CDEBUG(D_INFO, "%s: Sequence size: "LPU64"\n",
                                     seq->lcs_name, seq->lcs_width);
                      }
              }
      

      note that the last rc ==0 is always true, but it's also somewhat misleadign in that the thinking goes that we can be there with rc !=0, but would still set the setting, just not print the message which is total nonsense.

      Attachments

        Activity

          People

            wc-triage WC Triage
            green Oleg Drokin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: