Commit 825e0c16 authored by Nathan Scott's avatar Nathan Scott Committed by Christoph Hellwig

[XFS] V1 log tweak - fix log record length used when checking for a partial log

record write during log recovery head/tail calculations.

SGI Modid: 2.5.x-xfs:slinx:148895a
parent 2b274eee
......@@ -73,6 +73,9 @@ int xlog_btolrbb(int b);
#define XLOG_HEADER_SIZE 512
#define XLOG_REC_SHIFT(log) \
BTOBB(1 << (XFS_SB_VERSION_HASLOGV2(&log->l_mp->m_sb) ? \
XLOG_MAX_RECORD_BSHIFT : XLOG_BIG_RECORD_BSHIFT))
#define XLOG_TOTAL_REC_SHIFT(log) \
BTOBB(XLOG_MAX_ICLOGS << (XFS_SB_VERSION_HASLOGV2(&log->l_mp->m_sb) ? \
XLOG_MAX_RECORD_BSHIFT : XLOG_BIG_RECORD_BSHIFT))
......
......@@ -675,7 +675,7 @@ xlog_find_head(xlog_t *log,
* Now we need to make sure head_blk is not pointing to a block in
* the middle of a log record.
*/
num_scan_bblks = BTOBB(XLOG_MAX_RECORD_BSIZE);
num_scan_bblks = XLOG_REC_SHIFT(log);
if (head_blk >= num_scan_bblks) {
start_blk = head_blk - num_scan_bblks; /* don't read head_blk */
......
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