* bfs_free_cookie() accidently reverted a transaction after having updated
the inode's internal last modified and size copies, causing in inconsistent data. This fixes #1643. * The block being replayed are now dumped to the debug output. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23050 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
653eea311d
commit
4afaeabbd8
@ -380,7 +380,7 @@ Journal::_ReplayRunArray(int32 *_start)
|
|||||||
CachedBlock cached(fVolume);
|
CachedBlock cached(fVolume);
|
||||||
for (int32 index = 0; index < array->CountRuns(); index++) {
|
for (int32 index = 0; index < array->CountRuns(); index++) {
|
||||||
const block_run &run = array->RunAt(index);
|
const block_run &run = array->RunAt(index);
|
||||||
PRINT(("replay block run %lu:%u:%u in log at %Ld!\n",
|
INFORM(("replay block run %lu:%u:%u in log at %Ld!\n",
|
||||||
run.AllocationGroup(), run.Start(), run.Length(), blockNumber));
|
run.AllocationGroup(), run.Start(), run.Length(), blockNumber));
|
||||||
|
|
||||||
off_t offset = fVolume->ToOffset(run);
|
off_t offset = fVolume->ToOffset(run);
|
||||||
|
@ -1277,9 +1277,9 @@ bfs_free_cookie(void *_ns, void *_node, void *_cookie)
|
|||||||
}
|
}
|
||||||
|
|
||||||
WriteLocked locker(inode->Lock());
|
WriteLocked locker(inode->Lock());
|
||||||
status_t status = B_ERROR;
|
status_t status = transaction.IsStarted() ? B_OK : B_ERROR;
|
||||||
|
|
||||||
if (transaction.IsStarted()) {
|
if (status == B_OK) {
|
||||||
// trim the preallocated blocks and update the size,
|
// trim the preallocated blocks and update the size,
|
||||||
// and last_modified indices if needed
|
// and last_modified indices if needed
|
||||||
bool changedSize = false, changedTime = false;
|
bool changedSize = false, changedTime = false;
|
||||||
|
1
src/system/kernel/cache/block_cache.cpp
vendored
1
src/system/kernel/cache/block_cache.cpp
vendored
@ -40,6 +40,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DEBUG_BLOCK_CACHE
|
#define DEBUG_BLOCK_CACHE
|
||||||
|
//#define DEBUG_CHANGED
|
||||||
|
|
||||||
// This macro is used for fatal situations that are acceptable in a running
|
// This macro is used for fatal situations that are acceptable in a running
|
||||||
// system, like out of memory situations - should only panic for debugging.
|
// system, like out of memory situations - should only panic for debugging.
|
||||||
|
Loading…
Reference in New Issue
Block a user