* Added FS interface hooks io() and cancel_io(). The former is supposed
to provide asynchrounous (or only synchronous, if asynchronous is not
supported) I/O request support. It will eventually replace
{read,write}_pages(). None of the FS implementations implement them
yet.
* Implemented some support functions for request-based I/O. File system
implementations can use do_fd_io() which passes an I/O request to the
layer responsible for a given FD, and do_iterative_fd_io(), which
translates a request for a file to subrequests for the underlying
device and passes them on. Both fall back to synchrounous processing
when the io() hook is not supported.
Furthermore added vfs_synchronous_io() which should be handy for the
devfs to perform io_requests synchronously for devices that don't
support the io() hook.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26655 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -26,6 +26,8 @@ typedef fssh_ino_t fssh_vnode_id;
|
||||
/* the file system's private data structures */
|
||||
typedef void *fssh_fs_cookie;
|
||||
|
||||
typedef struct FSSHIORequest fssh_io_request;
|
||||
|
||||
/* additional flags passed to write_stat() */
|
||||
#define FSSH_B_STAT_SIZE_INSECURE 0x2000
|
||||
|
||||
@@ -142,6 +144,12 @@ struct fssh_fs_vnode_ops {
|
||||
fssh_fs_cookie cookie, fssh_off_t pos, const fssh_iovec *vecs,
|
||||
fssh_size_t count, fssh_size_t *_numBytes);
|
||||
|
||||
/* asynchronous I/O */
|
||||
fssh_status_t (*io)(fssh_fs_volume *volume, fssh_fs_vnode *vnode,
|
||||
void *cookie, fssh_io_request *request);
|
||||
fssh_status_t (*cancel_io)(fssh_fs_volume *volume, fssh_fs_vnode *vnode,
|
||||
void *cookie, fssh_io_request *request);
|
||||
|
||||
/* cache file access */
|
||||
fssh_status_t (*get_file_map)(fssh_fs_volume *volume, fssh_fs_vnode *vnode,
|
||||
fssh_off_t offset, fssh_size_t size,
|
||||
|
||||
Reference in New Issue
Block a user