@@ -282,22 +282,15 @@ xlog_print_trans_buffer(char **ptr, int len, int *i, int num_ops)
if (be32_to_cpu(head->oh_len) < 4*8) {
printf(_("Out of space\n"));
} else {
- __be64 a, b;
+ struct xfs_dsb *dsb = (struct xfs_dsb *) *ptr;
printf("\n");
- /*
- * memmove because *ptr may not be 8-byte aligned
- */
- memmove(&a, *ptr, sizeof(__be64));
- memmove(&b, *ptr+8, sizeof(__be64));
printf(_("icount: %llu ifree: %llu "),
- (unsigned long long) be64_to_cpu(a),
- (unsigned long long) be64_to_cpu(b));
- memmove(&a, *ptr+16, sizeof(__be64));
- memmove(&b, *ptr+24, sizeof(__be64));
+ (unsigned long long) get_unaligned_be64(dsb->sb_icount),
+ (unsigned long long) get_unaligned_be64(dsb->sb_ifree));
printf(_("fdblks: %llu frext: %llu\n"),
- (unsigned long long) be64_to_cpu(a),
- (unsigned long long) be64_to_cpu(b));
+ (unsigned long long) get_unaligned_be64(dsb->sb_fdblocks),
+ (unsigned long long) get_unaligned_be64(dsb->sb_frextents));
}
super_block = 0;
} else if (be32_to_cpu(*(__be32 *)(*ptr)) == XFS_AGI_MAGIC) {