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

[style][uselessAssignmentPtrArg] Assignment of function parameter has no effect outside the function.

Details

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

    Description

      File:lustre-wc-rel/lustre/osd-ldiskfs/osd_scrub.c
      Line:785

      static void osd_scrub_post(struct osd_scrub *scrub, int result)
      {
              struct scrub_file *sf = &scrub->os_file;
              ENTRY;
      
              CDEBUG(D_LFSCK, "%.16s: OI scrub post, result = %d\n",
                     osd_scrub2name(scrub), result);
      .
      .
      .
              sf->sf_run_time += cfs_duration_sec(cfs_time_current() + HALF_SEC -
                                                  scrub->os_time_last_checkpoint);
              result = osd_scrub_file_store(scrub); <--- Assignment of function parameter has no effect outside the function.
              up_write(&scrub->os_rwsem);
      
              EXIT;
      }
      

      Called from:

      static int osd_scrub_main(void *args)
      {
              struct lu_env         env;
              struct osd_device    *dev    = (struct osd_device *)args;
              struct osd_scrub     *scrub  = &dev->od_scrub;
              struct ptlrpc_thread *thread = &scrub->os_thread;
              int                   rc;
              ENTRY;
      .
      .
      .
      post:
              osd_scrub_post(scrub, rc); <--- Called from here
              CDEBUG(D_LFSCK, "%.16s: OI scrub: stop, pos = %u: rc = %d\n",
                     osd_scrub2name(scrub), scrub->os_pos_current, rc);
      
      out:
              while (!list_empty(&scrub->os_inconsistent_items)) {
                      struct osd_inconsistent_item *oii;
      
                      oii = list_entry(scrub->os_inconsistent_items.next,
                                           struct osd_inconsistent_item, oii_list);
                      list_del_init(&oii->oii_list);
                      OBD_FREE_PTR(oii);
              }
              lu_env_fini(&env);
      
      noenv:
              spin_lock(&scrub->os_lock);
              thread_set_flags(thread, SVC_STOPPED);
              wake_up_all(&thread->t_ctl_waitq);
              spin_unlock(&scrub->os_lock);
              return rc;
      }
      

      Attachments

        Activity

          [LU-7120] [style][uselessAssignmentPtrArg] Assignment of function parameter has no effect outside the function.

          Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/16368/
          Subject: LU-7120 scrub: handle osd_scrub_post return value
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: 2057592b01a4751d3e6c25f5604a288d37981857

          gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/16368/ Subject: LU-7120 scrub: handle osd_scrub_post return value Project: fs/lustre-release Branch: master Current Patch Set: Commit: 2057592b01a4751d3e6c25f5604a288d37981857

          Fan Yong (fan.yong@intel.com) uploaded a new patch: http://review.whamcloud.com/16368
          Subject: LU-7120 scrub: handle osd_scrub_post return value
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: d1591a3ba47d6d873730faf85654f3ddfa5345ff

          gerrit Gerrit Updater added a comment - Fan Yong (fan.yong@intel.com) uploaded a new patch: http://review.whamcloud.com/16368 Subject: LU-7120 scrub: handle osd_scrub_post return value Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: d1591a3ba47d6d873730faf85654f3ddfa5345ff
          pjones Peter Jones added a comment -

          Fan Yong

          Could you please look into this?

          Thanks

          Peter

          pjones Peter Jones added a comment - Fan Yong Could you please look into this? Thanks Peter

          People

            yong.fan nasf (Inactive)
            app Ashish Purkar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: