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:
John Baldwin 2022-03-03 17:52:07 -08:00
parent 5a1de9c25d
commit 9af41803cb

View file

@ -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