From 92a076fcce5c7a569279ede163efbd88b3e56a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 22 Nov 2004 20:49:55 +0000 Subject: [PATCH] Journal::FlushLogAndBlocks() no longer uses Journal::Lock() but the lock directly. That avoids starting a new transaction for no reason (which wouldn't do any harm, but still, it's not necessary to do that at all). log_entry::cached_blocks is no longer maintained or needed. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10185 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/file_systems/bfs/Journal.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/add-ons/kernel/file_systems/bfs/Journal.cpp b/src/add-ons/kernel/file_systems/bfs/Journal.cpp index 488044f99d..a86cfc8537 100644 --- a/src/add-ons/kernel/file_systems/bfs/Journal.cpp +++ b/src/add-ons/kernel/file_systems/bfs/Journal.cpp @@ -181,6 +181,8 @@ Journal::blockNotify(int32 transactionID, void *arg) { log_entry *logEntry = (log_entry *)arg; + PRINT(("Log entry %p has been finished, transaction ID = %ld\n", logEntry, transactionID)); + Journal *journal = logEntry->journal; disk_super_block &superBlock = journal->fVolume->SuperBlock(); bool update = false; @@ -283,7 +285,6 @@ Journal::WriteLogEntry() if (logEntry != NULL) { logEntry->start = logStart; logEntry->length = TransactionSize(); - logEntry->cached_blocks = array->count; logEntry->journal = this; fEntriesLock.Lock(); @@ -322,7 +323,7 @@ Journal::WriteLogEntry() status_t Journal::FlushLogAndBlocks() { - status_t status = Lock((Transaction *)this); + status_t status = fLock.Lock(); if (status != B_OK) return status; @@ -335,7 +336,7 @@ Journal::FlushLogAndBlocks() } status = fVolume->FlushDevice(); - Unlock((Transaction *)this, true); + fLock.Unlock(); return status; }