@@ -684,10 +684,20 @@ Journal::_TransactionWritten(int32 transactionID, int32 event, void* _logEntry)
|
|||||||
/*static*/ void
|
/*static*/ void
|
||||||
Journal::_TransactionIdle(int32 transactionID, int32 event, void* _journal)
|
Journal::_TransactionIdle(int32 transactionID, int32 event, void* _journal)
|
||||||
{
|
{
|
||||||
// The current transaction seems to be idle - flush it
|
// The current transaction seems to be idle - flush it. We can't do this
|
||||||
|
// in this thread, as flushing the log can produce new transaction events.
|
||||||
|
thread_id id = spawn_kernel_thread(&Journal::_FlushLog, "bfs log flusher",
|
||||||
|
B_NORMAL_PRIORITY, _journal);
|
||||||
|
if (id > 0)
|
||||||
|
resume_thread(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*static*/ status_t
|
||||||
|
Journal::_FlushLog(void* _journal)
|
||||||
|
{
|
||||||
Journal* journal = (Journal*)_journal;
|
Journal* journal = (Journal*)_journal;
|
||||||
journal->_FlushLog(false, false);
|
return journal->_FlushLog(false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,9 @@ private:
|
|||||||
int32 event, void* _logEntry);
|
int32 event, void* _logEntry);
|
||||||
static void _TransactionIdle(int32 transactionID, int32 event,
|
static void _TransactionIdle(int32 transactionID, int32 event,
|
||||||
void* _journal);
|
void* _journal);
|
||||||
|
static status_t _FlushLog(void* _journal);
|
||||||
|
|
||||||
|
private:
|
||||||
Volume* fVolume;
|
Volume* fVolume;
|
||||||
recursive_lock fLock;
|
recursive_lock fLock;
|
||||||
Transaction* fOwner;
|
Transaction* fOwner;
|
||||||
|
|||||||
Reference in New Issue
Block a user