Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • Lustre 2.4.0, Lustre 2.5.0
    • None
    • clang 3.4
    • 3
    • 10815

    Description

      While porting lustre to macos i found a some strange behavior - likely wrong type used for variable.

      osc_request.c:2503:41: error: implicit conversion from 'unsigned long long' to 'int' changes value from 2199023255552 to 0 [-Werror,-Wconstant-conversion]
              int match_lvb = (agl != 0 ? 0 : LDLM_FL_LVB_READY);
                  ~~~~~~~~~                   ^~~~~~~~~~~~~~~~~
      /Users/shadow/work/lustre/work/WC-review/mac-os/lustre/include/lustre_dlm_flags.h:244:41: note: expanded from macro 'LDLM_FL_LVB_READY'
      #define LDLM_FL_LVB_READY               0x0000020000000000ULL // bit  41
      
      

      so if we assign 64bit data to 32bit variable - we will be have zero always and that logic newer work.

      Attachments

        Activity

          [LU-4023] wrong type used for ldlm flag
          jlevi Jodi Levi (Inactive) made changes -
          Fix Version/s New: Lustre 2.6.0 [ 10595 ]
          pjones Peter Jones made changes -
          Labels Original: mq413
          adilger Andreas Dilger made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          adilger Andreas Dilger made changes -
          Fix Version/s New: Lustre 2.5.0 [ 10295 ]
          Fix Version/s Original: Lustre 2.5.1 [ 10608 ]
          adilger Andreas Dilger made changes -
          Labels New: mq413
          adilger Andreas Dilger made changes -
          Summary Original: wrong type used New: wrong type used for ldlm flag
          adilger Andreas Dilger made changes -
          Fix Version/s New: Lustre 2.4.2 [ 10605 ]
          Fix Version/s New: Lustre 2.5.1 [ 10608 ]
          Fix Version/s Original: Lustre 2.5.0 [ 10295 ]
          adilger Andreas Dilger made changes -
          Affects Version/s Original: Lustre 2.2.0 [ 10082 ]
          adilger Andreas Dilger made changes -
          Affects Version/s New: Lustre 2.4.0 [ 10154 ]
          Affects Version/s New: Lustre 2.2.0 [ 10082 ]
          Affects Version/s New: Lustre 2.5.0 [ 10295 ]
          pjones Peter Jones made changes -
          Priority Original: Critical [ 2 ] New: Blocker [ 1 ]

          People

            dmiter Dmitry Eremin (Inactive)
            shadow Alexey Lyashkov
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: