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

wrong type used for ldlm flag

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: Lustre 2.4.0, Lustre 2.5.0
    • Labels:
      None
    • Environment:
      clang 3.4
    • Severity:
      3
    • Rank (Obsolete):
      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

            People

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

              Dates

              Created:
              Updated:
              Resolved: