diff options
author | Ian Moffett <ian@osmora.org> | 2024-12-07 03:20:25 -0500 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-12-07 03:20:25 -0500 |
commit | cd612d0b75e322db04625128bdb1e475d1274736 (patch) | |
tree | 7046c9ead21b97768d9bb0ec40e5121eac697f39 /sys/include | |
parent | 07ddaa07aca2c75fef8b5234de0651535fbe5af0 (diff) |
kernel: vcache: Improve vcache add/pull interface
Require internal add/pull routines to be passed a pointer to the vcache
to be operated on. This makes it easier to support for per-process vcaches and LZVM.
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include')
-rw-r--r-- | sys/include/sys/vnode.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/include/sys/vnode.h b/sys/include/sys/vnode.h index 33d5b17..d9f9afe 100644 --- a/sys/include/sys/vnode.h +++ b/sys/include/sys/vnode.h @@ -48,6 +48,15 @@ struct vnode { TAILQ_ENTRY(vnode) vcache_link; }; +/* + * Vnode cache, can be per-process or + * global. + */ +struct vcache { + TAILQ_HEAD(vcache_head, vnode) q; + ssize_t size; /* In entries (-1 not set up) */ +}; + #define vfs_vref(VP) (atomic_inc_int(&(VP)->refcount)) /* vcache types */ |