Author: kpvdr
Date: 2009-01-29 16:06:00 -0500 (Thu, 29 Jan 2009)
New Revision: 3081
Modified:
store/trunk/cpp/lib/jrnl/rmgr.cpp
Log:
Additional code path for BZ480964 found and fixed.
Modified: store/trunk/cpp/lib/jrnl/rmgr.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/rmgr.cpp 2009-01-29 19:26:34 UTC (rev 3080)
+++ store/trunk/cpp/lib/jrnl/rmgr.cpp 2009-01-29 21:06:00 UTC (rev 3081)
@@ -288,19 +288,22 @@
}
else // File header reads have no pcb
{
- std::memcpy(&_fhdr, _fhdr_buffer, sizeof(file_hdr));
- _rrfc.add_cmpl_cnt_dblks(JRNL_SBLK_SIZE);
+ if (!_rrfc.is_void())
+ {
+ std::memcpy(&_fhdr, _fhdr_buffer, sizeof(file_hdr));
+ _rrfc.add_cmpl_cnt_dblks(JRNL_SBLK_SIZE);
- u_int32_t fro_dblks = (_fhdr._fro / JRNL_DBLK_SIZE) - JRNL_SBLK_SIZE;
- _pg_cntr = fro_dblks / (JRNL_RMGR_PAGE_SIZE * JRNL_SBLK_SIZE);
- u_int32_t tot_pg_offs_dblks = _pg_cntr * JRNL_RMGR_PAGE_SIZE *
JRNL_SBLK_SIZE;
- _pg_index = _pg_cntr % JRNL_RMGR_PAGES;
- _pg_offset_dblks = fro_dblks - tot_pg_offs_dblks;
- _rrfc.add_subm_cnt_dblks(tot_pg_offs_dblks);
- _rrfc.add_cmpl_cnt_dblks(tot_pg_offs_dblks);
+ u_int32_t fro_dblks = (_fhdr._fro / JRNL_DBLK_SIZE) - JRNL_SBLK_SIZE;
+ _pg_cntr = fro_dblks / (JRNL_RMGR_PAGE_SIZE * JRNL_SBLK_SIZE);
+ u_int32_t tot_pg_offs_dblks = _pg_cntr * JRNL_RMGR_PAGE_SIZE *
JRNL_SBLK_SIZE;
+ _pg_index = _pg_cntr % JRNL_RMGR_PAGES;
+ _pg_offset_dblks = fro_dblks - tot_pg_offs_dblks;
+ _rrfc.add_subm_cnt_dblks(tot_pg_offs_dblks);
+ _rrfc.add_cmpl_cnt_dblks(tot_pg_offs_dblks);
- _fhdr_rd_outstanding = false;
- _rrfc.set_valid();
+ _fhdr_rd_outstanding = false;
+ _rrfc.set_valid();
+ }
}
}
Show replies by date