* 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
@@ -118,7 +118,7 @@ extern void fssh_file_map_invalidate(void *_map, fssh_off_t offset,
extern fssh_status_t fssh_file_map_set_mode(void *_map, uint32_t mode);
extern fssh_status_t fssh_file_map_translate(void *_map, fssh_off_t offset,
fssh_size_t size, struct fssh_file_io_vec *vecs,
fssh_size_t *_count);
fssh_size_t *_count, fssh_size_t align);
#ifdef __cplusplus
}