Changeset 24752

Show
Ignore:
Timestamp:
04/02/08 10:54:22 (2 months ago)
Author:
axeld
Message:
* Quick fix for a possible deadlock I introduced with the block_cache
  idle notification. We should rework the cache notifications to work
  asynchronously.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • haiku/trunk/src/add-ons/kernel/file_systems/bfs/Journal.cpp

    r24738 r24752  
    595595 
    596596        Journal *journal = (Journal *)_journal; 
    597         journal->_FlushLog(); 
     597        journal->_FlushLog(false, false); 
    598598} 
    599599 
     
    794794*/ 
    795795status_t 
    796 Journal::_FlushLog(bool flushBlocks) 
    797 { 
    798         status_t status = fLock.Lock(); 
     796Journal::_FlushLog(bool canWait, bool flushBlocks) 
     797{ 
     798        status_t status = canWait ? fLock.Lock() : fLock.LockWithTimeout(0); 
    799799        if (status != B_OK) 
    800800                return status; 
     
    828828Journal::FlushLogAndBlocks() 
    829829{ 
    830         return _FlushLog(true); 
     830        return _FlushLog(true, true); 
    831831} 
    832832 
  • haiku/trunk/src/add-ons/kernel/file_systems/bfs/Journal.h

    r24738 r24752  
    5353        private: 
    5454                bool _HasSubTransaction() { return fHasSubtransaction; } 
    55                 status_t _FlushLog(bool flushBlocks = false); 
     55                status_t _FlushLog(bool canWait, bool flushBlocks); 
    5656                uint32 _TransactionSize() const; 
    5757                status_t _WriteTransactionToLog();