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

Fix minor errors with cfs_time_seconds usage

Details

    • Improvement
    • Resolution: Fixed
    • Critical
    • Lustre 2.14.0
    • Lustre 2.11.0, Lustre 2.12.0, Lustre 2.13.0
    • 9223372036854775807

    Description

      cfs_time_seconds() converts seconds to jiffies.

      Unfortunately the name might suggest it returns seconds, rather than consumes them, so it is worth while doing an occasion audit to make sure it isn't being misused.

      At time of writing there is one place (in delayed_msg_check) where it is used but not needed (we have seconds and want seconds), and two places (ptl_recover_import and mgc_process_log) where the returned value is stored in a variable called "sec".  The variable is used correctly as jiffies, but the name is confusing.

      These irregularities should be fixed.

      Attachments

        Issue Links

          Activity

            [LU-12931] Fix minor errors with cfs_time_seconds usage

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/40145/
            Subject: LU-12931 libcfs: skip cfs_time_seconds() indirection
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: faeeda3a69689f48605561f9e86e5a59b7d6b1fc

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/40145/ Subject: LU-12931 libcfs: skip cfs_time_seconds() indirection Project: fs/lustre-release Branch: master Current Patch Set: Commit: faeeda3a69689f48605561f9e86e5a59b7d6b1fc

            Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/40145
            Subject: LU-12931 libcfs: skip cfs_time_seconds() indirection
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: e3f8313165de044e793b280b6722b1fce8abe713

            gerrit Gerrit Updater added a comment - Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/40145 Subject: LU-12931 libcfs: skip cfs_time_seconds() indirection Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: e3f8313165de044e793b280b6722b1fce8abe713

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/38365/
            Subject: LU-12931 ldlm: use proper units for timeouts
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 3108bbb0b8485484bc1ac8ba5bac4276fc11c7c3

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/38365/ Subject: LU-12931 ldlm: use proper units for timeouts Project: fs/lustre-release Branch: master Current Patch Set: Commit: 3108bbb0b8485484bc1ac8ba5bac4276fc11c7c3

            Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/38365
            Subject: LU-12931 ldlm: use proper units for timeouts
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 1ec25e295d0c8028eeb49f5951f03b95693912c5

            gerrit Gerrit Updater added a comment - Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/38365 Subject: LU-12931 ldlm: use proper units for timeouts Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 1ec25e295d0c8028eeb49f5951f03b95693912c5

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36702/
            Subject: LU-12931 gnilnd: use time_after() to compare jiffies
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: bd1808a3a250003d865a6b0624bad2b5204bbd12

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36702/ Subject: LU-12931 gnilnd: use time_after() to compare jiffies Project: fs/lustre-release Branch: master Current Patch Set: Commit: bd1808a3a250003d865a6b0624bad2b5204bbd12

            Seems all patches landed. If more are needed we can reopen.

            simmonsja James A Simmons added a comment - Seems all patches landed. If more are needed we can reopen.

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36688/
            Subject: LU-12931 timers: correctly offset mod_timer.
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: e150810faa5b22382b2213225478c3763195438b

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36688/ Subject: LU-12931 timers: correctly offset mod_timer. Project: fs/lustre-release Branch: master Current Patch Set: Commit: e150810faa5b22382b2213225478c3763195438b

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36668/
            Subject: LU-12931 general: fix some cfs_time_seconds() inconsistencies.
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 451a2634a967a4784340ba1c47182e0bdb4d56e1

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36668/ Subject: LU-12931 general: fix some cfs_time_seconds() inconsistencies. Project: fs/lustre-release Branch: master Current Patch Set: Commit: 451a2634a967a4784340ba1c47182e0bdb4d56e1

            Note - only one of the patches 36702/36701/36688 needs to be landed. The 36658 patch is fixing an unrelated (cosmetic) issue.

            adilger Andreas Dilger added a comment - Note - only one of the patches 36702/36701/36688 needs to be landed. The 36658 patch is fixing an unrelated (cosmetic) issue.

            Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/36702
            Subject: LU-12931 misc: use jiffies for schedule_timeout()
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: fd8a19e7ff56e63db6bf00e6c31004ee7781def8

            gerrit Gerrit Updater added a comment - Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/36702 Subject: LU-12931 misc: use jiffies for schedule_timeout() Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: fd8a19e7ff56e63db6bf00e6c31004ee7781def8

            People

              neilb Neil Brown
              neilb Neil Brown
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: