Return a ENOMEM error if xfs_log_recover.c can't get a big_bp buffer.
This can happen a small memory machines, 32mb or less.
*** xfs_log_recover.c.orig Thu Aug 3 19:40:04 2000
--- xfs_log_recover.c Thu Aug 3 19:42:54 2000
***************
*** 494,500 ****
* we actually look at the block size of the filesystem.
*/
num_scan_bblks = BTOBB(XLOG_MAX_ICLOGS<<XLOG_MAX_RECORD_BSHIFT);
! big_bp = xlog_get_bp(num_scan_bblks,log->l_mp);
if (head_blk >= num_scan_bblks) {
/*
* We are guaranteed that the entire check can be performed
--- 494,504 ----
* we actually look at the block size of the filesystem.
*/
num_scan_bblks = BTOBB(XLOG_MAX_ICLOGS<<XLOG_MAX_RECORD_BSHIFT);
! big_bp = xlog_get_bp(num_scan_bblks,log->l_mp);
! if(big_bp == NULL) {
! error = XFS_ERROR(ENOMEM);
! goto bp_err;
! }
if (head_blk >= num_scan_bblks) {
/*
* We are guaranteed that the entire check can be performed
***************
*** 962,967 ****
--- 966,975 ----
num_scan_bblks = BTOBB(XLOG_MAX_ICLOGS<<XLOG_MAX_RECORD_BSHIFT);
ASSERT(num_scan_bblks <= INT_MAX);
big_bp = xlog_get_bp((int)num_scan_bblks,log->l_mp);
+ if(big_bp == NULL) {
+ error = XFS_ERROR(ENOMEM);
+ goto bp_err;
+ }
ASSERT(big_bp);
if (last_blk < num_scan_bblks)
--
|