Commit baed14ec authored by Timothy Shimmin's avatar Timothy Shimmin Committed by Stephen Lord

[XFS] Change xlog_verify_iclog() to use idx as zero based instead

of 1 based index into array. 
Nathan tried this change out on some benchmarks and it seems 
to help - stop the assert from happening.

SGI Modid: 2.5.x-xfs:slinx:156160a
parent 130b6627
......@@ -3427,8 +3427,8 @@ xlog_verify_iclog(xlog_t *log,
if (syncing == B_FALSE || (field_offset & 0x1ff)) {
clientid = ophead->oh_clientid;
} else {
idx = BTOBB((xfs_caddr_t)&(ophead->oh_clientid) - iclog->ic_datap);
if (idx > (XLOG_HEADER_CYCLE_SIZE / BBSIZE)) {
idx = BTOBBT((xfs_caddr_t)&(ophead->oh_clientid) - iclog->ic_datap);
if (idx >= (XLOG_HEADER_CYCLE_SIZE / BBSIZE)) {
j = idx / (XLOG_HEADER_CYCLE_SIZE / BBSIZE);
k = idx % (XLOG_HEADER_CYCLE_SIZE / BBSIZE);
clientid = GET_CLIENT_ID(xhdr[j].hic_xheader.xh_cycle_data[k], ARCH_CONVERT);
......@@ -3445,9 +3445,9 @@ xlog_verify_iclog(xlog_t *log,
if (syncing == B_FALSE || (field_offset & 0x1ff)) {
op_len = INT_GET(ophead->oh_len, ARCH_CONVERT);
} else {
idx = BTOBB((__psint_t)&ophead->oh_len -
idx = BTOBBT((__psint_t)&ophead->oh_len -
(__psint_t)iclog->ic_datap);
if (idx > (XLOG_HEADER_CYCLE_SIZE / BBSIZE)) {
if (idx >= (XLOG_HEADER_CYCLE_SIZE / BBSIZE)) {
j = idx / (XLOG_HEADER_CYCLE_SIZE / BBSIZE);
k = idx % (XLOG_HEADER_CYCLE_SIZE / BBSIZE);
op_len = INT_GET(xhdr[j].hic_xheader.xh_cycle_data[k], ARCH_CONVERT);
......
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