[LU-4738] lmv_placement_policy directly accesses __le32 lum_stripe_offset Created: 07/Mar/14  Updated: 26/Mar/14  Resolved: 26/Mar/14

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.6.0

Type: Bug Priority: Minor
Reporter: John Hammond Assignee: John Hammond
Resolution: Fixed Votes: 0
Labels: RoDC, endianness, lmv

Severity: 3
Rank (Obsolete): 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


 Comments   
Comment by John Hammond [ 14/Mar/14 ]

Please see http://review.whamcloud.com/9671.

Comment by John Hammond [ 26/Mar/14 ]

Patch landed to master.

Generated at Sat Feb 10 01:45:25 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.