Implemented a simple directory entry cache to speed up path resolution.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27366 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-09-08 05:08:37 +00:00
parent 204737b832
commit ee1a1571a2
5 changed files with 237 additions and 1 deletions
+6
View File
@@ -99,6 +99,12 @@ 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, size_t align);
/* entry cache */
extern status_t entry_cache_add(dev_t mountID, ino_t dirID, const char* name,
ino_t nodeID);
extern status_t entry_cache_remove(dev_t mountID, ino_t dirID,
const char* name);
#ifdef __cplusplus
}
#endif
@@ -846,6 +846,10 @@
#define file_map_invalidate fssh_file_map_invalidate
#define file_map_translate fssh_file_map_translate
/* entry cache */
#define entry_cache_add fssh_entry_cache_add
#define entry_cache_remove fssh_entry_cache_remove
////////////////////////////////////////////////////////////////////////////////
// #pragma mark - fssh_fs_index.h
+7
View File
@@ -120,6 +120,13 @@ 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 align);
/* entry cache */
extern fssh_status_t fssh_entry_cache_add(fssh_dev_t mountID,
fssh_ino_t dirID, const char* name,
fssh_ino_t nodeID);
extern fssh_status_t fssh_entry_cache_remove(fssh_dev_t mountID,
fssh_ino_t dirID, const char* name);
#ifdef __cplusplus
}
#endif