From 663150d3710bb2d3b1808a3d64b03977c72aae08 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Fri, 1 Mar 2024 20:19:55 -0500 Subject: kernel: vfs: Update vnode structure Added vnode operations structure, removed some unused fields to clean up, and added new fields. Signed-off-by: Ian Moffett --- sys/include/sys/vnode.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'sys/include') diff --git a/sys/include/sys/vnode.h b/sys/include/sys/vnode.h index b8b1337..f584356 100644 --- a/sys/include/sys/vnode.h +++ b/sys/include/sys/vnode.h @@ -34,12 +34,20 @@ #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); +}; + struct vnode { int type; int flags; - int usecount; /* Ref count of uses */ struct mount *mp; /* Ptr to vfs vnode is in */ - TAILQ_ENTRY(vnode) freelist; + struct vops *vops; + struct vnode *parent; + void *data; /* Filesystem specific data */ }; /* -- cgit v1.2.3