Whamcloud - gitweb
LU-107 Add scripts for implementing heartbeat v1 failover
[fs/lustre-release.git] / lustre / obdclass / llog_swab.c
index e70a453..e8a7296 100644 (file)
@@ -1,6 +1,4 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
  * GPL HEADER START
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -111,7 +109,8 @@ void lustre_swab_lu_seq_range(struct lu_seq_range *range)
 {
         __swab64s (&range->lsr_start);
         __swab64s (&range->lsr_end);
-        __swab32s (&range->lsr_mdt);
+        __swab32s (&range->lsr_index);
+        __swab32s (&range->lsr_flags);
 }
 EXPORT_SYMBOL(lustre_swab_lu_seq_range);
 
@@ -164,6 +163,13 @@ void lustre_swab_llog_rec(struct llog_rec_hdr *rec, struct llog_rec_tail *tail)
                 __swab64s(&cr->cr.cr_time);
                 lustre_swab_lu_fid(&cr->cr.cr_tfid);
                 lustre_swab_lu_fid(&cr->cr.cr_pfid);
+               if (CHANGELOG_REC_EXTENDED(&cr->cr)) {
+                       struct llog_changelog_ext_rec *ext =
+                               (struct llog_changelog_ext_rec *)rec;
+
+                       lustre_swab_lu_fid(&ext->cr.cr_sfid);
+                       lustre_swab_lu_fid(&ext->cr.cr_spfid);
+               }
                 break;
         }