* It is now supported that I/O operations and requests are only handled
partially (e.g. due to hitting the end of file). The respective
classes have grown new methods and attributes to deal with that. The
"finished" callbacks have got additional parameters to indicate
whether the transfer was only partial and how much has been
transferred. Other callbacks and functions have a size_t* in/out
parameter instead of a simple size_t, now.
* vfs_{read,write}_pages() do now use the I/O request framework instead
of the underlying FS's {read,write}_pages() hooks (those should be
unused now). Furthermore they've got an additional "flags" parameter,
which is passed to IORequest::Init(), i.e. it allows to specify that
the given vecs refer to physical addresses.
* The file cache's read_into_cache() reads directly into physical
pages, now.
* Fixed bug in DoIO::IO(): The offset was not adjusted, so that all
pages were incorrectly transferred from/to the same location.
* Fixed broken subrequest scheduling loop head in
do_iterative_fd_io_iterate().
* Adjusted the test driver and implemented its io() hook. Using this
driver I/O requests are passed all the way from the VFS/VM to the
driver and through the I/O scheduler. It even seems to work. :-)
* Added missing const to the iovec* parameter of the IORequest::Init()
methods.
* Disabled some debug output by default. Added new optional debug
output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26692 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -299,7 +299,7 @@ typedef status_t (*iterative_io_get_vecs)(void *cookie, io_request* request,
|
||||
off_t offset, size_t size, struct file_io_vec *vecs,
|
||||
size_t *_count);
|
||||
typedef status_t (*iterative_io_finished)(void* cookie, io_request* request,
|
||||
status_t status);
|
||||
status_t status, bool partialTransfer, size_t bytesTransferred);
|
||||
|
||||
extern status_t new_vnode(fs_volume *volume, ino_t vnodeID, void *privateNode,
|
||||
fs_vnode_ops *ops);
|
||||
|
||||
@@ -334,7 +334,8 @@ typedef fssh_status_t (*fssh_iterative_io_get_vecs)(void *cookie,
|
||||
fssh_io_request* request, fssh_off_t offset, fssh_size_t size,
|
||||
struct fssh_file_io_vec *vecs, fssh_size_t *_count);
|
||||
typedef fssh_status_t (*fssh_iterative_io_finished)(void* cookie,
|
||||
fssh_io_request* request, fssh_status_t status);
|
||||
fssh_io_request* request, fssh_status_t status,
|
||||
bool partialTransfer, fssh_size_t bytesTransferred);
|
||||
|
||||
extern fssh_status_t fssh_new_vnode(fssh_fs_volume *volume,
|
||||
fssh_vnode_id vnodeID, void *privateNode,
|
||||
|
||||
@@ -94,13 +94,13 @@ void vfs_acquire_vnode(struct vnode *vnode);
|
||||
status_t vfs_get_cookie_from_fd(int fd, void **_cookie);
|
||||
bool vfs_can_page(struct vnode *vnode, void *cookie);
|
||||
status_t vfs_read_pages(struct vnode *vnode, void *cookie, off_t pos,
|
||||
const iovec *vecs, size_t count, size_t *_numBytes);
|
||||
const iovec *vecs, size_t count, uint32 flags, size_t *_numBytes);
|
||||
status_t vfs_write_pages(struct vnode *vnode, void *cookie, off_t pos,
|
||||
const iovec *vecs, size_t count, size_t *_numBytes);
|
||||
const iovec *vecs, size_t count, uint32 flags, size_t *_numBytes);
|
||||
status_t vfs_vnode_io(struct vnode* vnode, void* cookie, io_request* request);
|
||||
status_t vfs_synchronous_io(io_request* request,
|
||||
status_t (*doIO)(void* cookie, off_t offset, void* buffer,
|
||||
size_t length),
|
||||
size_t* length),
|
||||
void* cookie);
|
||||
status_t vfs_get_vnode_cache(struct vnode *vnode, struct VMCache **_cache,
|
||||
bool allocate);
|
||||
|
||||
Reference in New Issue
Block a user