From cd612d0b75e322db04625128bdb1e475d1274736 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sat, 7 Dec 2024 03:20:25 -0500 Subject: 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 --- sys/include/sys/vnode.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sys/include') 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 */ -- cgit v1.2.3