summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-03-01 20:19:55 -0500
committerIan Moffett <ian@osmora.org>2024-03-01 20:19:55 -0500
commit663150d3710bb2d3b1808a3d64b03977c72aae08 (patch)
tree6fefd9d46c58f7544250f0910e4b817f570b0a3c
parentf02103dc085299361914b26c4183e8a8ca347b64 (diff)
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 <ian@osmora.org>
-rw-r--r--sys/include/sys/vnode.h12
1 files changed, 10 insertions, 2 deletions
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 <sys/queue.h>
#include <sys/mount.h>
+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 */
};
/*