Add VNASSERT() which is just like KASSERT() but takes a vnode argument

which it will vn_printf() if it triggers.
This commit is contained in:
phk 2005-02-07 12:56:19 +00:00
parent 0e1a43a2c6
commit 002c1cefd3

View File

@ -74,8 +74,15 @@ extern int maxusers; /* system tune hint */
if (__predict_false(!(exp))) \
panic msg; \
} while (0)
#define VNASSERT(exp, vp, msg) do { \
if (__predict_false(!(exp))) { \
vn_printf(vp, "VNASSERT failed\n"); \
panic msg; \
} \
} while (0)
#else
#define KASSERT(exp,msg)
#define VNASSERT(exp, vp, msg)
#endif
#ifndef CTASSERT /* Allow lint to override */