diff --git a/src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp b/src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp index 2720f72d36..bcd7ddcd08 100644 --- a/src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp +++ b/src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp @@ -797,9 +797,12 @@ BPlusTree::MakeEmpty() node->overflow_link = HOST_ENDIAN_TO_BFS_INT64((uint64)BPLUSTREE_FREE); - // It's not important to write it out in a single transaction - if (transaction.IsTooLarge()) - transaction.Split(); + // It's not important to write it out in a single transaction; just + // make sure it doesn't get too large + if (offset % (1024 * 1024) == 0) { + transaction.Done(); + transaction.Start(fStream->GetVolume(), fStream->BlockNumber()); + } } return transaction.Done(); diff --git a/src/add-ons/kernel/file_systems/bfs/Journal.h b/src/add-ons/kernel/file_systems/bfs/Journal.h index 848817c399..c128a96c2b 100644 --- a/src/add-ons/kernel/file_systems/bfs/Journal.h +++ b/src/add-ons/kernel/file_systems/bfs/Journal.h @@ -1,5 +1,5 @@ /* - * Copyright 2001-2010, Axel Dörfler, axeld@pinc-software.de. + * Copyright 2001-2012, Axel Dörfler, axeld@pinc-software.de. * This file may be used under the terms of the MIT License. */ #ifndef JOURNAL_H @@ -178,12 +178,6 @@ public: return B_OK; } - void Split() - { - cache_start_sub_transaction(fJournal->GetVolume()->BlockCache(), - fJournal->TransactionID()); - } - Volume* GetVolume() const { return fJournal != NULL ? fJournal->GetVolume() : NULL; } int32 ID() const