kernel/fs: Add support for setting custom VMCaches in vnodes.
This adds one (private) VFS function, and checks in all usages of the vnode->cache as a VMVnodeCache that it really is one. (Generic usages, for the moment just the ReleaseRef() calls in vnode destruction, are intentionally not touched.) This will be used by ramfs to set the cache from its own, so that map_file() calls on a ramfs can work.
This commit is contained in:
@@ -112,6 +112,7 @@ status_t vfs_synchronous_io(io_request* request,
|
||||
void* cookie);
|
||||
status_t vfs_get_vnode_cache(struct vnode *vnode, struct VMCache **_cache,
|
||||
bool allocate);
|
||||
status_t vfs_set_vnode_cache(struct vnode *vnode, struct VMCache *_cache);
|
||||
status_t vfs_get_file_map(struct vnode *vnode, off_t offset, size_t size,
|
||||
struct file_io_vec *vecs, size_t *_count);
|
||||
status_t vfs_get_fs_node_from_path(fs_volume *volume, const char *path,
|
||||
|
||||
Reference in New Issue
Block a user