BFS: Assert in RemovedInodes(), don't just have a comment.
This would've caught the cause of #19953.
This commit is contained in:
@@ -28,10 +28,10 @@ public:
|
|||||||
status_t Lock(Transaction* owner,
|
status_t Lock(Transaction* owner,
|
||||||
bool separateSubTransactions);
|
bool separateSubTransactions);
|
||||||
status_t Unlock(Transaction* owner, bool success);
|
status_t Unlock(Transaction* owner, bool success);
|
||||||
|
void AssertLocked() { ASSERT_LOCKED_RECURSIVE(&fLock); }
|
||||||
|
|
||||||
status_t ReplayLog();
|
status_t ReplayLog();
|
||||||
|
|
||||||
Transaction* CurrentTransaction() const { return fOwner; }
|
|
||||||
size_t CurrentTransactionSize() const;
|
size_t CurrentTransactionSize() const;
|
||||||
bool CurrentTransactionTooLarge() const;
|
bool CurrentTransactionTooLarge() const;
|
||||||
|
|
||||||
|
|||||||
@@ -414,6 +414,15 @@ Volume::WriteSuperBlock()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
InodeList&
|
||||||
|
Volume::RemovedInodes()
|
||||||
|
{
|
||||||
|
// This list is guarded by the transaction lock.
|
||||||
|
fJournal->AssertLocked();
|
||||||
|
return fRemovedInodes;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Volume::UpdateLiveQueries(Inode* inode, const char* attribute, int32 type,
|
Volume::UpdateLiveQueries(Inode* inode, const char* attribute, int32 type,
|
||||||
const uint8* oldKey, size_t oldLength, const uint8* newKey,
|
const uint8* oldKey, size_t oldLength, const uint8* newKey,
|
||||||
|
|||||||
@@ -99,8 +99,7 @@ public:
|
|||||||
|
|
||||||
status_t CreateVolumeID(Transaction& transaction);
|
status_t CreateVolumeID(Transaction& transaction);
|
||||||
|
|
||||||
InodeList& RemovedInodes() { return fRemovedInodes; }
|
InodeList& RemovedInodes();
|
||||||
// This list is guarded by the transaction lock
|
|
||||||
|
|
||||||
// block bitmap
|
// block bitmap
|
||||||
BlockAllocator& Allocator();
|
BlockAllocator& Allocator();
|
||||||
|
|||||||
Reference in New Issue
Block a user