From c58a3b28101582e19f64afe07667d1280221003c Mon Sep 17 00:00:00 2001 From: yangsheng Date: Thu, 28 Aug 2008 05:39:08 +0000 Subject: [PATCH] Branch b1_8_gate b=16758 i=shadow, adilger, johann Fixed the endian problem for PPC64 patchless client. --- lustre/lov/lov_ea.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lustre/lov/lov_ea.c b/lustre/lov/lov_ea.c index 3e03e85..a1ee559 100755 --- a/lustre/lov/lov_ea.c +++ b/lustre/lov/lov_ea.c @@ -450,7 +450,8 @@ static int lovea_unpack_array(struct llog_handle *handle, /* insert extent desc into lsm extent array */ lai->lai_ext_array[cursor].le_start = le64_to_cpu(med->med_start); lai->lai_ext_array[cursor].le_len = le64_to_cpu(med->med_len); - lai->lai_ext_array[cursor].le_stripe_count = lmm->lmm_stripe_count; + lai->lai_ext_array[cursor].le_stripe_count = + le32_to_cpu(lmm->lmm_stripe_count); /* unpack extent's lmm to lov_oinfo array */ loi_index = lai->lai_ext_array[cursor].le_loi_idx; @@ -590,8 +591,10 @@ static int lovea_init_array_info(struct lov_stripe_md *lsm, if (!lai) RETURN(-ENOMEM); - lai->lai_array_id = *logid; - lai->lai_ext_count = extent_count; + lai->lai_array_id.lgl_oid = le64_to_cpu(logid->lgl_oid); + lai->lai_array_id.lgl_ogr = le64_to_cpu(logid->lgl_ogr); + lai->lai_array_id.lgl_ogen = le32_to_cpu(logid->lgl_ogen); + lai->lai_ext_count = le32_to_cpu(extent_count); lsm->lsm_array = lai; RETURN(0); } -- 1.8.3.1