diff options
author | Ian Moffett <ian@osmora.org> | 2025-10-15 14:48:21 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-10-15 14:48:21 -0400 |
commit | f39d4994c80225986fb6b27ef2ecef9268540b69 (patch) | |
tree | 22fffdcaa7f704f77ec77a71cdabd0d9c5e29be5 /src/sys/include/os/vnode.h | |
parent | 4343f79fb78d9c3e4b2c7e09147cc499562593d2 (diff) |
kern: vfs: Add reclaim callback to vnode
The reclaim callback simply reclaims any filesystem specific resources used with
vnodes back to the operating system.
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/sys/include/os/vnode.h')
-rw-r--r-- | src/sys/include/os/vnode.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sys/include/os/vnode.h b/src/sys/include/os/vnode.h index 9054a55..1bef1e2 100644 --- a/src/sys/include/os/vnode.h +++ b/src/sys/include/os/vnode.h @@ -88,6 +88,7 @@ struct vop_rw_data { */ struct vop { int(*lookup)(struct vop_lookup_args *args); + int(*reclaim)(struct vnode *vp, int flags); ssize_t(*write)(struct vop_rw_data *data); ssize_t(*read)(struct vop_rw_data *data); }; @@ -164,4 +165,15 @@ ssize_t vop_write(struct vnode *vp, char *data, off_t off, size_t len); */ ssize_t vop_read(struct vnode *vp, char *data, off_t off, size_t len); +/* + * Reclaim the resources tied to a specific vnode + * + * @vp: Vnode to reclaim + * @flags: Optional flags + * + * Returns zero on success, otherwise a less than zero value + * on failure. + */ +int vop_reclaim(struct vnode *vp, int flags); + #endif /* !_OS_VNODE_H_ */ |