* BFS now panics if cache_sync_transaction() didn't free the space needed,

instead of writing over the old log entries.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24856 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-04-07 12:15:15 +00:00
parent b9fe86d2d7
commit 8b5e5656f4
1 changed files with 6 additions and 1 deletions

View File

@ -727,8 +727,13 @@ Journal::_WriteTransactionToLog()
// If necessary, flush the log, so that we have enough space for this
// transaction
if (runArrays.LogEntryLength() > FreeLogBlocks())
if (runArrays.LogEntryLength() > FreeLogBlocks()) {
cache_sync_transaction(fVolume->BlockCache(), fTransactionID);
if (runArrays.LogEntryLength() > FreeLogBlocks()) {
panic("no space in log after sync (%ld for %ld blocks)!",
(long)FreeLogBlocks(), (long)runArrays.LogEntryLength());
}
}
// Write log entries to disk