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/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

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

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

            James Simmons (jsimmons@infradead.org) uploaded a new patch: https://review.whamcloud.com/36688
            Subject: LU-12931 timers: correctly offset mod_timer.
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: b2342bd0f3ce8bf388626cef3735b60e573de55d

            gerrit Gerrit Updater added a comment - James Simmons (jsimmons@infradead.org) uploaded a new patch: https://review.whamcloud.com/36688 Subject: LU-12931 timers: correctly offset mod_timer. Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: b2342bd0f3ce8bf388626cef3735b60e573de55d

            Neil Brown (neilb@suse.de) uploaded a new 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: 1
            Commit: 09fc491dafd95596493ce50ebaefc6e9da95498a

            gerrit Gerrit Updater added a comment - Neil Brown (neilb@suse.de) uploaded a new 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: 1 Commit: 09fc491dafd95596493ce50ebaefc6e9da95498a

            Neil Brown (neilb@suse.de) uploaded a new patch: https://review.whamcloud.com/36658
            Subject: LU-12931 general: fix some cfs_time_seconds() inconsistencies.
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 4522b507bed9b53329afbb387dc0318512f4deb3

            gerrit Gerrit Updater added a comment - Neil Brown (neilb@suse.de) uploaded a new patch: https://review.whamcloud.com/36658 Subject: LU-12931 general: fix some cfs_time_seconds() inconsistencies. Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 4522b507bed9b53329afbb387dc0318512f4deb3

            People

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

              Dates

                Created:
                Updated:
                Resolved: