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

improve variable naming to clarify code usage

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • None
    • 9223372036854775807

    Description

      There are lots of places in the code that have very generic variable names like "flags" or "mask" that are confusing to distinguish in places, because it isn't clear what the type of values those flags hold.

      Add named enums for the variables where possible to make it very clear what type of flag is being used, and/or rename the variable to help make this clear. In a couple of cases the variable type is determined by the kernel API and cannot be changed.

      Attachments

        Activity

          [LU-12885] improve variable naming to clarify code usage

          "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/36469/
          Subject: LU-12885 mds: add enums for MDS_OPEN flags
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: 7e499228df5f9c39393ed003ff97c93a1f11c79f

          gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/36469/ Subject: LU-12885 mds: add enums for MDS_OPEN flags Project: fs/lustre-release Branch: master Current Patch Set: Commit: 7e499228df5f9c39393ed003ff97c93a1f11c79f

          "Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/55066
          Subject: LU-12885 mds: add enums for MDS_OPEN flags (2/4)
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: be0689814f427f6838a4de4183d799e85e5c4d7c

          gerrit Gerrit Updater added a comment - "Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/55066 Subject: LU-12885 mds: add enums for MDS_OPEN flags (2/4) Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: be0689814f427f6838a4de4183d799e85e5c4d7c

          "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/36522/
          Subject: LU-12885 mdd: only bottom of clf_flags in changelog
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: 3b43457cf150c03c496be72265d09574ea470308

          gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/36522/ Subject: LU-12885 mdd: only bottom of clf_flags in changelog Project: fs/lustre-release Branch: master Current Patch Set: Commit: 3b43457cf150c03c496be72265d09574ea470308

          "Andreas Dilger <adilger@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45924
          Subject: LU-12885 llite: add enum ll_file_flags for clarity
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: c73f2401ae794d1186568b43871cdfe61703ec16

          gerrit Gerrit Updater added a comment - "Andreas Dilger <adilger@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45924 Subject: LU-12885 llite: add enum ll_file_flags for clarity Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: c73f2401ae794d1186568b43871cdfe61703ec16

          Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36524/
          Subject: LU-12885 llapi: use enum llapi_layout_get_flags
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: ae98601fed3e99af5376311cb4b02d2c65ccd1fe

          gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36524/ Subject: LU-12885 llapi: use enum llapi_layout_get_flags Project: fs/lustre-release Branch: master Current Patch Set: Commit: ae98601fed3e99af5376311cb4b02d2c65ccd1fe

          Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/33512/
          Subject: LU-12885 mds: add enums for MDS_ATTR flags
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: 6c6b8cb972ac92c08dd91d25e57cc6a3703d951e

          gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/33512/ Subject: LU-12885 mds: add enums for MDS_ATTR flags Project: fs/lustre-release Branch: master Current Patch Set: Commit: 6c6b8cb972ac92c08dd91d25e57cc6a3703d951e

          Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36520/
          Subject: LU-12885 mdd: clearly name variables for MAY_ flags
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: 76b9cf2565eb7a5dff65bf508d5762a109345f5d

          gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36520/ Subject: LU-12885 mdd: clearly name variables for MAY_ flags Project: fs/lustre-release Branch: master Current Patch Set: Commit: 76b9cf2565eb7a5dff65bf508d5762a109345f5d

          Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36519/
          Subject: LU-12885 llite: mark extended attr and inode flags
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: b51a1e1140cac80c0590183be05e905bf87294d4

          gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36519/ Subject: LU-12885 llite: mark extended attr and inode flags Project: fs/lustre-release Branch: master Current Patch Set: Commit: b51a1e1140cac80c0590183be05e905bf87294d4

          Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/40008
          Subject: LU-12885 osd: rename xattr operation flags consistently
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: 0420d3815133f5264801cc524dd2064e29bbb31a

          gerrit Gerrit Updater added a comment - Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/40008 Subject: LU-12885 osd: rename xattr operation flags consistently Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 0420d3815133f5264801cc524dd2064e29bbb31a

          Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/36524
          Subject: LU-12885 llapi: use enum llapi_layout_get_flags
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: e49613a28af050a33a021333fda3b3bf082ba15d

          gerrit Gerrit Updater added a comment - Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/36524 Subject: LU-12885 llapi: use enum llapi_layout_get_flags Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: e49613a28af050a33a021333fda3b3bf082ba15d
          gerrit Gerrit Updater added a comment - - edited

          Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/36523
          Subject: LU-12885 osd: rename xattr operation flags consistently
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: 39a42d686a18c442c3434b1751ddee9f806783c9

          gerrit Gerrit Updater added a comment - - edited Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/36523 Subject: LU-12885 osd: rename xattr operation flags consistently Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 39a42d686a18c442c3434b1751ddee9f806783c9

          People

            adilger Andreas Dilger
            adilger Andreas Dilger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: