* Added parameter "size_t align" to file_map_translate(). If > 1, the

vector at the end of the file will be aligned to the given value.
* BFS uses an alignment of 512 bytes (should be block size of the
  underlying device or BFS block size, whatever is less), which should
  be fine, since file data are only stored in BFS blocks. This totally
  avoids any partial operations at the I/O scheduler level, thus saving
  disk operations. Not that I could measure any performance difference.
  Theoretically it should help a lot though, particularly when dealing
  with lots of small files, since we avoid using bounce buffers, which
  are (a) limited in number and (b) require copying of the data.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27246 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-08-30 23:06:28 +00:00
parent fd49e6b35a
commit 4612433715
7 changed files with 41 additions and 26 deletions
+1 -1
View File
@@ -97,7 +97,7 @@ extern void file_map_set_size(void *_map, off_t size);
extern void file_map_invalidate(void *_map, off_t offset, off_t size);
extern status_t file_map_set_mode(void *_map, uint32 mode);
extern status_t file_map_translate(void *_map, off_t offset, size_t size,
struct file_io_vec *vecs, size_t *_count);
struct file_io_vec *vecs, size_t *_count, size_t align);
#ifdef __cplusplus
}