* Inode::_FreeStreamArray() kept one block it should have freed when the
new size fell on a block boundary. * Removed newline from Inode::Remove() tracing. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23652 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
d8fe1829e2
commit
d62f743549
@ -68,7 +68,7 @@ class Remove : public AbstractTraceEntry {
|
|||||||
|
|
||||||
virtual void AddDump(char *buffer, size_t size)
|
virtual void AddDump(char *buffer, size_t size)
|
||||||
{
|
{
|
||||||
snprintf(buffer, size, "REMOVE %Ld (%p), \"%s\"\n", fID, fInode,
|
snprintf(buffer, size, "REMOVE %Ld (%p), \"%s\"", fID, fInode,
|
||||||
fName);
|
fName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1979,8 +1979,10 @@ Inode::_FreeStreamArray(Transaction &transaction, block_run *array,
|
|||||||
// determine the block_run to be freed
|
// determine the block_run to be freed
|
||||||
if (newOffset > size && offset < size) {
|
if (newOffset > size && offset < size) {
|
||||||
// free partial block_run (and update the original block_run)
|
// free partial block_run (and update the original block_run)
|
||||||
run.start = array[i].start
|
run.start = HOST_ENDIAN_TO_BFS_INT16(array[i].Start()
|
||||||
+ ((size - offset) >> fVolume->BlockShift()) + 1;
|
+ ((size + fVolume->BlockSize() - 1 - offset)
|
||||||
|
>> fVolume->BlockShift()));
|
||||||
|
// round to next block
|
||||||
array[i].length = HOST_ENDIAN_TO_BFS_INT16(run.Start()
|
array[i].length = HOST_ENDIAN_TO_BFS_INT16(run.Start()
|
||||||
- array[i].Start());
|
- array[i].Start());
|
||||||
run.length = HOST_ENDIAN_TO_BFS_INT16(run.Length()
|
run.length = HOST_ENDIAN_TO_BFS_INT16(run.Length()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user