Commit c0d545a6 authored by Timothy Shimmin's avatar Timothy Shimmin Committed by Nathan Scott

[XFS] Fix up header length miscalculation affecting version 1 logs.

SGI Modid: xfs-linux:xfs-kern:178055a
Signed-off-by: default avatarNathan Scott <nathans@sgi.com>
parent e05b0c00
......@@ -1411,9 +1411,13 @@ xlog_sync(xlog_t *log,
xlog_pack_data(log, iclog); /* put cycle number in every block */
/* real byte length */
INT_SET(iclog->ic_header.h_len,
ARCH_CONVERT,
iclog->ic_offset + iclog->ic_roundoff);
if (XFS_SB_VERSION_HASLOGV2(&log->l_mp->m_sb)) {
INT_SET(iclog->ic_header.h_len,
ARCH_CONVERT,
iclog->ic_offset + iclog->ic_roundoff);
} else {
INT_SET(iclog->ic_header.h_len, ARCH_CONVERT, iclog->ic_offset);
}
/* put ops count in correct order */
ops = iclog->ic_header.h_num_logops;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment