Argl, turns out Be's replay log routine cannot handle block_runs with a size unequal
1 - IOW using block_runs here is completely bogus. Crippled our code to not create longer block_runs - at least, a dirty BFS image is now a dirty BFS image - you can mount a dirty image on either system and it will work :-) The R5 version of our BFS is still incompatible though - ie. running bfs_shell or copy_to_bfs_image on a dirty image will still potentially corrupt it. Maybe I'll even port the changes over one day... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14418 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
b68efdcaa7
commit
e620c9328c
@ -166,6 +166,9 @@ RunArrays::_AddRun(block_run &run)
|
||||
{
|
||||
ASSERT(run.length == 1);
|
||||
|
||||
// Be's BFS log replay routine can only deal with block_runs of size 1
|
||||
// A pity, isn't it? Too sad we have to be compatible.
|
||||
#if 0
|
||||
// search for an existing adjacent block_run
|
||||
// ToDo: this could be improved by sorting and a binary search
|
||||
|
||||
@ -193,6 +196,7 @@ RunArrays::_AddRun(block_run &run)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// no entry found, add new to the last array
|
||||
|
||||
@ -381,7 +385,6 @@ Journal::_ReplayRunArray(int32 *_start)
|
||||
if (data == NULL)
|
||||
RETURN_ERROR(B_IO_ERROR);
|
||||
|
||||
dprintf("replay block: %Ld\n", fVolume->ToBlock(run) + i);
|
||||
ssize_t written = write_pos(fVolume->Device(),
|
||||
offset + (i * blockSize), data, blockSize);
|
||||
if (written != blockSize)
|
||||
@ -562,6 +565,7 @@ Journal::WriteLogEntry()
|
||||
run_array *array = runArrays.ArrayAt(k);
|
||||
int32 index = 0, count = 1;
|
||||
int32 wrap = fLogSize - logStart;
|
||||
|
||||
add_to_iovec(vecs, index, maxVecs, (void *)array, fVolume->BlockSize());
|
||||
|
||||
// add block runs
|
||||
|
Loading…
Reference in New Issue
Block a user