* Applied patch by Janito that solves a TODO and utilizes the actual device

block size to align the file map.
* This closes ticket #5707, thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36144 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2010-04-11 12:05:59 +00:00
parent ef38ad6821
commit 1a1a8f33d1
3 changed files with 7 additions and 5 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2001-2009, Axel Dörfler, [email protected].
* Copyright 2001-2010, Axel Dörfler, [email protected].
* This file may be used under the terms of the MIT License.
*/
@@ -87,9 +87,9 @@ iterative_io_get_vecs_hook(void* cookie, io_request* request, off_t offset,
size_t size, struct file_io_vec* vecs, size_t* _count)
{
Inode* inode = (Inode*)cookie;
return file_map_translate(inode->Map(), offset, size, vecs, _count, 512);
// TODO: Use the actual block size of the underlying device for the
// alignment!
return file_map_translate(inode->Map(), offset, size, vecs, _count,
inode->GetVolume()->BlockSize());
}