* Quick fix for a possible deadlock I introduced with the block_cache
idle notification. We should rework the cache notifications to work asynchronously. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24752 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
0931d2f309
commit
12952eddd7
@ -594,7 +594,7 @@ Journal::_TransactionListener(int32 transactionID, int32 event, void *_journal)
|
||||
// The current transaction seems to be idle - flush it
|
||||
|
||||
Journal *journal = (Journal *)_journal;
|
||||
journal->_FlushLog();
|
||||
journal->_FlushLog(false, false);
|
||||
}
|
||||
|
||||
|
||||
@ -793,9 +793,9 @@ Journal::_WriteTransactionToLog()
|
||||
also write back all dirty blocks for this volume.
|
||||
*/
|
||||
status_t
|
||||
Journal::_FlushLog(bool flushBlocks)
|
||||
Journal::_FlushLog(bool canWait, bool flushBlocks)
|
||||
{
|
||||
status_t status = fLock.Lock();
|
||||
status_t status = canWait ? fLock.Lock() : fLock.LockWithTimeout(0);
|
||||
if (status != B_OK)
|
||||
return status;
|
||||
|
||||
@ -827,7 +827,7 @@ Journal::_FlushLog(bool flushBlocks)
|
||||
status_t
|
||||
Journal::FlushLogAndBlocks()
|
||||
{
|
||||
return _FlushLog(true);
|
||||
return _FlushLog(true, true);
|
||||
}
|
||||
|
||||
|
||||
|
@ -52,7 +52,7 @@ class Journal {
|
||||
|
||||
private:
|
||||
bool _HasSubTransaction() { return fHasSubtransaction; }
|
||||
status_t _FlushLog(bool flushBlocks = false);
|
||||
status_t _FlushLog(bool canWait, bool flushBlocks);
|
||||
uint32 _TransactionSize() const;
|
||||
status_t _WriteTransactionToLog();
|
||||
status_t _CheckRunArray(const run_array *array);
|
||||
|
Loading…
Reference in New Issue
Block a user