*/
/*
* This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
*
* lustre/obdclass/llog_swab.c
*
* Because the tail follows a variable-length structure we need
* to compute its location at runtime
*/
- tail = (struct llog_rec_tail *)((char *)&cr->cr +
- changelog_rec_size(&cr->cr) +
- cr->cr.cr_namelen);
+ tail = (struct llog_rec_tail *)((char *)rec +
+ rec->lrh_len - sizeof(*tail));
break;
}
case CHANGELOG_USER_REC:
+ case CHANGELOG_USER_REC2:
{
- struct llog_changelog_user_rec *cur =
- (struct llog_changelog_user_rec *)rec;
+ struct llog_changelog_user_rec2 *cur =
+ (struct llog_changelog_user_rec2 *)rec;
__swab32s(&cur->cur_id);
__swab64s(&cur->cur_endrec);
__swab32s(&cur->cur_time);
- tail = &cur->cur_tail;
+ if (cur->cur_hdr.lrh_type == CHANGELOG_USER_REC2) {
+ __swab32s(&cur->cur_mask);
+ BUILD_BUG_ON(offsetof(typeof(*cur), cur_padding1) == 0);
+ BUILD_BUG_ON(offsetof(typeof(*cur), cur_padding2) == 0);
+ BUILD_BUG_ON(offsetof(typeof(*cur), cur_padding3) == 0);
+ }
+ tail = (struct llog_rec_tail *)((char *)rec +
+ rec->lrh_len - sizeof(*tail));
break;
}
print_lustre_cfg(lcfg);
EXIT;
- return;
}
/* used only for compatibility with old on-disk cfg_marker data */
__u32 createtime, canceltime;
/*
* There was a problem with the original declaration of
- * cfg_marker on 32-bit systems because it used time_t as
+ * cfg_marker on 32-bit systems because it used 32 time as
* a wire protocol structure, and didn't verify this in
* wirecheck. We now have to convert the offsets of the
* later fields in order to work on 32- and 64-bit systems.
}
EXIT;
- return;
}