X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fobdclass%2Fllog_swab.c;h=a6a430d3ca6c5e1b961d1a47fdfeafe4314ac2e5;hb=c63852e37c8992cbf84eb972711bddb3c5eb7c7f;hp=d91c1df88bff755fc52bea9743ba834a51f74e72;hpb=02275be141a4cc8880b87095829d2b7388339d0d;p=fs%2Flustre-release.git diff --git a/lustre/obdclass/llog_swab.c b/lustre/obdclass/llog_swab.c index d91c1df..a6a430d 100644 --- a/lustre/obdclass/llog_swab.c +++ b/lustre/obdclass/llog_swab.c @@ -107,12 +107,13 @@ void lustre_swab_lu_fid(struct lu_fid *fid) } EXPORT_SYMBOL(lustre_swab_lu_fid); -void lustre_swab_lu_range(struct lu_range *range) +void lustre_swab_lu_seq_range(struct lu_seq_range *range) { - __swab64s (&range->lr_start); - __swab64s (&range->lr_end); + __swab64s (&range->lsr_start); + __swab64s (&range->lsr_end); + __swab32s (&range->lsr_mdt); } -EXPORT_SYMBOL(lustre_swab_lu_range); +EXPORT_SYMBOL(lustre_swab_lu_seq_range); void lustre_swab_llog_rec(struct llog_rec_hdr *rec, struct llog_rec_tail *tail) { @@ -127,7 +128,6 @@ void lustre_swab_llog_rec(struct llog_rec_hdr *rec, struct llog_rec_tail *tail) lustre_swab_ll_fid(&lsc->lsc_fid); __swab32s(&lsc->lsc_ioepoch); - break; } @@ -139,7 +139,6 @@ void lustre_swab_llog_rec(struct llog_rec_hdr *rec, struct llog_rec_tail *tail) __swab64s(&lur->lur_oid); __swab32s(&lur->lur_ogen); - break; } @@ -150,12 +149,44 @@ void lustre_swab_llog_rec(struct llog_rec_hdr *rec, struct llog_rec_tail *tail) __swab32s(&lsr->lsr_ogen); __swab32s(&lsr->lsr_uid); __swab32s(&lsr->lsr_gid); + break; + } + + case CHANGELOG_REC: { + struct llog_changelog_rec *cr = (struct llog_changelog_rec*)rec; + + __swab16s(&cr->cr_flags); + __swab16s(&cr->cr_namelen); + __swab32s(&cr->cr_type); + __swab64s(&cr->cr_index); + __swab64s(&cr->cr_prev); + __swab64s(&cr->cr_time); + lustre_swab_lu_fid(&cr->cr_tfid); + lustre_swab_lu_fid(&cr->cr_pfid); + break; + } + + case CHANGELOG_USER_REC: { + struct llog_changelog_user_rec *cur = + (struct llog_changelog_user_rec*)rec; + + __swab32s(&cur->cur_id); + __swab64s(&cur->cur_endrec); + break; + } + + case MDS_SETATTR64_REC: { + struct llog_setattr64_rec *lsr = (struct llog_setattr64_rec *)rec; + + __swab64s(&lsr->lsr_oid); + __swab32s(&lsr->lsr_ogen); + __swab32s(&lsr->lsr_uid); + __swab32s(&lsr->lsr_gid); break; } case OBD_CFG_REC: - case PTL_CFG_REC: /* obsolete */ /* these are swabbed as they are consumed */ break; @@ -172,7 +203,6 @@ void lustre_swab_llog_rec(struct llog_rec_hdr *rec, struct llog_rec_tail *tail) __swab32s(&llh->llh_tail.lrt_index); __swab32s(&llh->llh_tail.lrt_len); } - break; } @@ -186,8 +216,6 @@ void lustre_swab_llog_rec(struct llog_rec_hdr *rec, struct llog_rec_tail *tail) } case LLOG_JOIN_REC: case LLOG_PAD_MAGIC: - /* ignore old pad records of type 0 */ - case 0: break; default: