* Unmounting a volume didn't wait for the block allocator's initializer thread.
* This fixed bug #2541. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26679 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
e9c954c387
commit
d06cc6e386
|
@ -626,6 +626,15 @@ BlockAllocator::_Initialize(BlockAllocator *allocator)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
BlockAllocator::Uninitialize()
|
||||
{
|
||||
// We only have to make sure that the initializer thread isn't running
|
||||
// anymore.
|
||||
mutex_lock(&fLock);
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
BlockAllocator::AllocateBlocks(Transaction &transaction, int32 group,
|
||||
uint16 start, uint16 maximum, uint16 minimum, block_run &run)
|
||||
|
|
|
@ -27,6 +27,8 @@ class BlockAllocator {
|
|||
status_t Initialize(bool full = true);
|
||||
status_t InitializeAndClearBitmap(Transaction &transaction);
|
||||
|
||||
void Uninitialize();
|
||||
|
||||
status_t AllocateForInode(Transaction &transaction, const block_run *parent,
|
||||
mode_t type, block_run &run);
|
||||
status_t Allocate(Transaction &transaction, Inode *inode, off_t numBlocks,
|
||||
|
|
|
@ -429,6 +429,8 @@ Volume::Unmount()
|
|||
// Unlike in BeOS, we need to put the reference to our root node ourselves
|
||||
put_vnode(fVolume, ToVnode(Root()));
|
||||
|
||||
fBlockAllocator.Uninitialize();
|
||||
|
||||
// This will also flush the log & all blocks to disk
|
||||
delete fJournal;
|
||||
fJournal = NULL;
|
||||
|
|
Loading…
Reference in New Issue