From ea0630ef550a3ed7bc38d54c8acab6c7ed075aba Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Tue, 26 Mar 2024 21:49:29 -0400 Subject: kernel: Use 'sio_txn' for file I/O Signed-off-by: Ian Moffett --- sys/include/sys/vfs.h | 3 ++- sys/include/sys/vnode.h | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'sys/include') diff --git a/sys/include/sys/vfs.h b/sys/include/sys/vfs.h index e219cf7..b454d39 100644 --- a/sys/include/sys/vfs.h +++ b/sys/include/sys/vfs.h @@ -33,6 +33,7 @@ #include #include #include +#include /* Max path length */ #define PATH_MAX 1024 @@ -50,7 +51,7 @@ char *vfs_get_fname_at(const char *path, size_t idx); int vfs_rootname(const char *path, char **new_path); bool vfs_is_valid_path(const char *path); ssize_t vfs_hash_path(const char *path); -ssize_t vfs_read(struct vnode *vp, char *buf, size_t count); +ssize_t vfs_read(struct vnode *vp, struct sio_txn *sio); #endif /* defined(_KERNEL) */ diff --git a/sys/include/sys/vnode.h b/sys/include/sys/vnode.h index 11bbf99..0352312 100644 --- a/sys/include/sys/vnode.h +++ b/sys/include/sys/vnode.h @@ -33,13 +33,14 @@ #include #include #include +#include struct vnode; struct vops { int(*vget)(struct vnode *parent, const char *name, struct vnode **vp); - int(*read)(struct vnode *vp, char *buf, size_t count); - int(*write)(struct vnode *vp, const char *buf, size_t count); + int(*read)(struct vnode *vp, struct sio_txn *sio); + int(*write)(struct vnode *vp, struct sio_txn *sio); }; struct vnode { -- cgit v1.2.3