From 55ecc6f48531cf63f6d058c135efde8e9b1d3045 Mon Sep 17 00:00:00 2001
From: yangsheng <yangsheng>
Date: Thu, 28 Aug 2008 05:45:37 +0000
Subject: [PATCH] Branch HEAD b=16758 i=shadow, adilger, johann

Fixed the endian problem for PPC64 patchless client.
---
 lustre/lov/lov_ea.c         | 9 ++++++---
 lustre/obdclass/llog_swab.c | 2 +-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/lustre/lov/lov_ea.c b/lustre/lov/lov_ea.c
index 66e5629cb7..8167469398 100755
--- a/lustre/lov/lov_ea.c
+++ b/lustre/lov/lov_ea.c
@@ -444,7 +444,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;
@@ -584,8 +585,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);
 }
diff --git a/lustre/obdclass/llog_swab.c b/lustre/obdclass/llog_swab.c
index efe58586ac..2fe194ee8c 100644
--- a/lustre/obdclass/llog_swab.c
+++ b/lustre/obdclass/llog_swab.c
@@ -184,7 +184,7 @@ void lustre_swab_llog_rec(struct llog_rec_hdr *rec, struct llog_rec_tail *tail)
                 __swab32s(&lid->lid_id.lgl_ogen);
                 break;
         }
-
+        case LLOG_JOIN_REC:
         case LLOG_PAD_MAGIC:
         /* ignore old pad records of type 0 */
         case 0:
-- 
GitLab