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

annotations for sparse static analyzer

Details

    • Bug
    • Resolution: Fixed
    • Trivial
    • Lustre 2.7.0
    • Lustre 2.6.0
    • 3
    • 15020

    Description

      sparse (git://git.kernel.org/pub/scm/devel/sparse/sparse.git) is a static analyzer used in kernel dev. After installing it, it can easily be used with Lustre:

      make C=1
      

      Currently there is about 3900 warnings. Most of it is noise, and a few annotations will silence them. However in that noise, some bugs might be lurking.

      Besides finding bugs, it currently tags 1000 functions that can be made static. Once marked static, that will enable the compiler to optimize them more aggressively, which may lead to some minor performance improvements.

      So far I've cleared about 1000 of them and found only one bug (strcmp with userspace provided buffer in fld_proc_hash_seq_write) and several unused functions.

      Attachments

        Issue Links

          Activity

            [LU-5396] annotations for sparse static analyzer

            Create a new ticket LU-6302 for future sparse patches, close this one for the fixes landed to 2.7.0.

            adilger Andreas Dilger added a comment - Create a new ticket LU-6302 for future sparse patches, close this one for the fixes landed to 2.7.0.

            There's more patches to come. There's about 300 warnings left.

            fzago Frank Zago (Inactive) added a comment - There's more patches to come. There's about 300 warnings left.

            Looks like all the patches for this ticket were landed.

            simmonsja James A Simmons added a comment - Looks like all the patches for this ticket were landed.

            Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12567/
            Subject: LU-5396 all: use NULL instead of 0
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: e49995acfd026f3ca85d05dc1b91d97a8743fe72

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12567/ Subject: LU-5396 all: use NULL instead of 0 Project: fs/lustre-release Branch: master Current Patch Set: Commit: e49995acfd026f3ca85d05dc1b91d97a8743fe72

            Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12223/
            Subject: LU-5396 lod: (and mdt, mgs) make some symbols static
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: ad1810a2dbea1eed5e8b5feb55bdf915a545feb3

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12223/ Subject: LU-5396 lod: (and mdt, mgs) make some symbols static Project: fs/lustre-release Branch: master Current Patch Set: Commit: ad1810a2dbea1eed5e8b5feb55bdf915a545feb3

            Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12206/
            Subject: LU-5396 lnet: make some functions static
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 33984c012883a7c714429d2c612cf6dcda191974

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12206/ Subject: LU-5396 lnet: make some functions static Project: fs/lustre-release Branch: master Current Patch Set: Commit: 33984c012883a7c714429d2c612cf6dcda191974

            Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12220/
            Subject: LU-5396 obdclass: make some functions static
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: e0ece89e1ac014a8443fe95860c4a43b88f16f63

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12220/ Subject: LU-5396 obdclass: make some functions static Project: fs/lustre-release Branch: master Current Patch Set: Commit: e0ece89e1ac014a8443fe95860c4a43b88f16f63

            Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12222/
            Subject: LU-5396 mdc: (and lmv, mgc, osc) make some functions static
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 35fe4c696dd0faadc9405c19c68f0dd56aa5bb01

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12222/ Subject: LU-5396 mdc: (and lmv, mgc, osc) make some functions static Project: fs/lustre-release Branch: master Current Patch Set: Commit: 35fe4c696dd0faadc9405c19c68f0dd56aa5bb01

            Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12221/
            Subject: LU-5396 lov: (and ldlm) make some functions static
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 9c6d90191a7d7685d98aee7fb49ff6c23e3956ff

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12221/ Subject: LU-5396 lov: (and ldlm) make some functions static Project: fs/lustre-release Branch: master Current Patch Set: Commit: 9c6d90191a7d7685d98aee7fb49ff6c23e3956ff

            Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12219/
            Subject: LU-5396 ptlrpc: make some functions static
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: d00c924149b5dd042e6fee09ef724013df1b4e14

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12219/ Subject: LU-5396 ptlrpc: make some functions static Project: fs/lustre-release Branch: master Current Patch Set: Commit: d00c924149b5dd042e6fee09ef724013df1b4e14

            People

              dmiter Dmitry Eremin (Inactive)
              fzago Frank Zago (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: