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

lmv_placement_policy directly accesses __le32 lum_stripe_offset

    XMLWordPrintable

Details

    • 3
    • 13020

    Description

      In lmv_placement_policy() lum is already in little endian. Thus the gets and sets to lum_stripe_offset should use le32_to_cpu() and cpu_to_le32(). This was found by rewriting the definition of lmv_user_md to use the __leXX typedefs rather than __uXX and running sparse.

      We should also rewrite lmv_user_md using the __leXX typedefs.

      /root/lustre-release/lustre/lmv/lmv_obd.c:1359:30: warning: incorrect type in assignment (different base types)
      /root/lustre-release/lustre/lmv/lmv_obd.c:1359:30:    expected unsigned int [unsigned] [usertype] <noident>
      /root/lustre-release/lustre/lmv/lmv_obd.c:1359:30:    got restricted __le32 [usertype] lum_stripe_offset
      /root/lustre-release/lustre/lmv/lmv_obd.c:1364:48:    expected restricted __le32 [usertype] lum_stripe_offset
      /root/lustre-release/lustre/lmv/lmv_obd.c:1364:48:    got unsigned int [unsigned] [usertype] op_mds
      

      Attachments

        Activity

          People

            jhammond John Hammond
            jhammond John Hammond
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: