mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Use vnsz2log directly in assertion on its relation to sizeof(struct vnode).
This reduces the size of diffs required to support different values of vnsz2log. In CheriBSD, kernels for CHERI architectures have vnodes larger than 512 bytes and require a value of 9. Reviewed by: mjg Obtained from: CheriBSD Sponsored by: University of Cambridge, Google, Inc. Differential Revision: https://reviews.freebsd.org/D34418
This commit is contained in:
parent
5a1de9c25d
commit
9af41803cb
1 changed files with 2 additions and 1 deletions
|
|
@ -462,7 +462,8 @@ SYSCTL_PROC(_debug, OID_AUTO, ftry_reclaim_vnode,
|
|||
/* Shift count for (uintptr_t)vp to initialize vp->v_hash. */
|
||||
#define vnsz2log 8
|
||||
#ifndef DEBUG_LOCKS
|
||||
_Static_assert((sizeof(struct vnode) >= 256) && (sizeof(struct vnode) < 512),
|
||||
_Static_assert(sizeof(struct vnode) >= 1UL << vnsz2log &&
|
||||
sizeof(struct vnode) < 1UL << (vnsz2log + 1),
|
||||
"vnsz2log needs to be updated");
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue