Description
In lmv_unpack_md_v1() we convert stripe count from little endian to CPU endian twice. This is a problem on big endian:
stripe_count = le32_to_cpu(lmm1->lmv_stripe_count);
for (i = 0; i < le32_to_cpu(stripe_count); i++) {
Trying to ls a striped directory from a PPC client:
LustreError: 5952:0:(lmv_fld.c:72:lmv_fld_lookup()) ASSERTION( (fid_seq_in_fldb(fid_seq(fid)) || fid_seq_is_local_file(fid_seq(fid))) && fid_is_sane(fid) ) failed: [0x0:0x0:0x0] is insane! LustreError: 5952:0:(lmv_fld.c:72:lmv_fld_lookup()) LBUG Kernel panic - not syncing: LBUG Call Trace: [c000000799e12d10] [c000000000012ef4] .show_stack+0x74/0x1c0 (unreliable) [c000000799e12dc0] [c0000000005e5920] .panic+0xc4/0x1f8 [c000000799e12e50] [d0000000063e14c0] .lbug_with_loc+0xb0/0xc0 [libcfs] [c000000799e12ee0] [d00000000a140eb0] .lmv_fld_lookup+0x260/0x620 [lmv] [c000000799e12fb0] [d00000000a122c20] .lmv_unpack_md+0x720/0x1530 [lmv] [c000000799e130d0] [d00000000a5154e0] .mdc_get_lustre_md+0x750/0x2690 [mdc] [c000000799e131e0] [d00000000a111238] .lmv_get_lustre_md+0xe8/0x590 [lmv] [c000000799e132c0] [d00000000ca1960c] .ll_prep_inode+0x17c/0x15d0 [lustre] [c000000799e13420] [d00000000ca3dce8] .ll_lookup_it_finish+0x418/0x1bb0 [lustre] [c000000799e13570] [d00000000ca3f8f8] .ll_lookup_it+0x478/0xf00 [lustre] [c000000799e136c0] [d00000000ca40464] .ll_lookup_nd+0xe4/0x7f0 [lustre] [c000000799e137b0] [c0000000001d7924] .do_lookup+0x254/0x2d0 [c000000799e13880] [c0000000001db5fc] .__link_path_walk+0x9dc/0x1610 [c000000799e139e0] [c0000000001dc5f8] .path_walk+0x98/0x180 [c000000799e13a80] [c0000000001dc91c] .filename_lookup+0x8c/0x100 [c000000799e13b20] [c0000000001dda90] .user_path_at+0x60/0xb0 [c000000799e13c70] [c0000000001cfe34] .vfs_fstatat+0x64/0x110 [c000000799e13d30] [c0000000001d0114] .SyS_newstat+0x24/0x50 [c000000799e13e30] [c000000000008564] syscall_exit+0x0/0x40