From 5692a950faa10d6774c2964898c7ce6f8faa188a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 30 May 2005 18:35:25 +0000 Subject: [PATCH] We don't stack transactions together, so we need to end each transaction, even if empty. Added some more debug output. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12904 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/file_systems/bfs/Journal.cpp | 13 ++++++++++--- 1 file changed, 10 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 120a121fc3..864ff5779a 100644 --- a/src/add-ons/kernel/file_systems/bfs/Journal.cpp +++ b/src/add-ons/kernel/file_systems/bfs/Journal.cpp @@ -236,8 +236,11 @@ Journal::WriteLogEntry() } sorted_array *array = fArray.Array(); - if (array == NULL || array->count == 0) + if (array == NULL || array->count == 0) { + // nothing has changed during this transaction + cache_end_transaction(fVolume->BlockCache(), fTransactionID, NULL, NULL); return B_OK; + } // Make sure there is enough space in the log. // If that fails for whatever reason, panic! @@ -350,8 +353,10 @@ Journal::FlushLogAndBlocks() status_t Journal::Lock(Transaction *owner) { - if (owner == fOwner) + if (owner == fOwner) { + dprintf("bfs(%ld): journal is already locked by caller\n", find_thread(NULL)); return B_OK; + } status_t status = fLock.Lock(); if (status == B_OK) @@ -376,8 +381,10 @@ Journal::Lock(Transaction *owner) void Journal::Unlock(Transaction *owner, bool success) { - if (owner != fOwner) + if (owner != fOwner) { + dprintf("bfs(%ld): journal is not owned by caller\n", find_thread(NULL)); return; + } TransactionDone(success);