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

Remove redundant LASSERT() in ns_is_{client,server}()

Details

    • 3
    • 9223372036854775807

    Description

      In ns_is_{client,server}(), (ns->ns_client == LDLM_NAMESPACE_CLIENT || ns->ns_client == LDLM_NAMESPACE_SERVER) implies that (!(ns->ns_client & ~(LDLM_NAMESPACE_CLIENT |
      LDLM_NAMESPACE_SERVER))) is also true, so the latter LASSERT() could be removed from ns_is_{client,server}().

       

      This might be an inconsequential issue. I have not checked if gcc optimizes-out one of the LASSERT()s.

      Attachments

        Activity

          [LU-11755] Remove redundant LASSERT() in ns_is_{client,server}()

          Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35193/
          Subject: LU-11755 ldlm: remove LASSERT() in ns_is_

          {client,server}

          ()
          Project: fs/lustre-release
          Branch: b2_12
          Current Patch Set:
          Commit: 19aefacda4623fb34b09f499ecf087fcb7b968f5

          gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35193/ Subject: LU-11755 ldlm: remove LASSERT() in ns_is_ {client,server} () Project: fs/lustre-release Branch: b2_12 Current Patch Set: Commit: 19aefacda4623fb34b09f499ecf087fcb7b968f5

          Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35193
          Subject: LU-11755 ldlm: remove LASSERT() in ns_is_

          {client,server}

          ()
          Project: fs/lustre-release
          Branch: b2_12
          Current Patch Set: 1
          Commit: d31110348f4f264cc3c04a7ada972b35cb01c5d8

          gerrit Gerrit Updater added a comment - Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35193 Subject: LU-11755 ldlm: remove LASSERT() in ns_is_ {client,server} () Project: fs/lustre-release Branch: b2_12 Current Patch Set: 1 Commit: d31110348f4f264cc3c04a7ada972b35cb01c5d8

          Hi  @Nikitas,

          I see.

          The ticket is closed, just let it go.

          I pinged you for that, because we hit a bug on this LASSERT(you patch removed), it's really strange, you know ns->ns_client is only used for namespace type check, and it'll never be changed once inited (new ldlm_namespace), we never hit similar problem before.

          guzheng Gu Zheng (Inactive) added a comment - Hi  @Nikitas, I see. The ticket is closed, just let it go. I pinged you for that, because we hit a bug on this LASSERT(you patch removed), it's really strange, you know ns->ns_client is only used for namespace type check, and it'll never be changed once inited (new ldlm_namespace), we never hit similar problem before.
          nangelinas Nikitas Angelinas added a comment - - edited

          Hi Gu Zheng,

          Sorry, I may have opened this as the wrong type of ticket. We did not hit any bugs related to this; it is only a cleanup. Should it be an improvement instead of a bug ticket?

          nangelinas Nikitas Angelinas added a comment - - edited Hi Gu Zheng, Sorry, I may have opened this as the wrong type of ticket. We did not hit any bugs related to this; it is only a cleanup. Should it be an improvement instead of a bug ticket?

          Hi  Nikitas Angelinas,

          This ticket was opened as a BUG, and patch has link to Cray-bug-id: LUS-6762 (Sorry that I can't access it),  so did you really hit similar bugs? or patch is only a cleanup.

          guzheng Gu Zheng (Inactive) added a comment - Hi  Nikitas Angelinas, This ticket was opened as a BUG , and patch has link to Cray-bug-id: LUS-6762 (Sorry that I can't access it),  so did you really hit similar bugs? or patch is only a cleanup.
          pjones Peter Jones added a comment -

          Landed for 2.13

          pjones Peter Jones added a comment - Landed for 2.13

          Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/33822/
          Subject: LU-11755 ldlm: remove LASSERT() in ns_is_

          {client,server}

          ()
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: 0af247b17619f586702b0ad37f0796bdf783b11c

          gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/33822/ Subject: LU-11755 ldlm: remove LASSERT() in ns_is_ {client,server} () Project: fs/lustre-release Branch: master Current Patch Set: Commit: 0af247b17619f586702b0ad37f0796bdf783b11c

          Nikitas Angelinas (nangelinas@cray.com) uploaded a new patch: https://review.whamcloud.com/33822
          Subject: LU-11755 ldlm: remove LASSERT() in ns_is_

          {client,server}

          ()
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: 2fff402f6bd8234f4598ba05b7323939afbd52d0

          gerrit Gerrit Updater added a comment - Nikitas Angelinas (nangelinas@cray.com) uploaded a new patch: https://review.whamcloud.com/33822 Subject: LU-11755 ldlm: remove LASSERT() in ns_is_ {client,server} () Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 2fff402f6bd8234f4598ba05b7323939afbd52d0
          nangelinas Nikitas Angelinas added a comment - - edited

          Sorry, I meant to say "if gcc optimizes-out the first LASSERT()", in the description.

          nangelinas Nikitas Angelinas added a comment - - edited Sorry, I meant to say "if gcc optimizes-out the first LASSERT()", in the description.

          People

            nangelinas Nikitas Angelinas
            nangelinas Nikitas Angelinas
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: