Page MenuHomeFreeBSD

vfs: add VNPASS macro and augment VNASSERT to print more about the assert
ClosedPublic

Authored by mjg on Jan 28 2020, 11:39 AM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 15 2024, 4:20 PM
Unknown Object (File)
Oct 1 2024, 7:10 AM
Unknown Object (File)
Sep 30 2024, 11:46 AM
Unknown Object (File)
Sep 18 2024, 12:19 AM
Unknown Object (File)
Sep 5 2024, 12:30 AM
Unknown Object (File)
Sep 3 2024, 7:10 PM
Unknown Object (File)
Jun 29 2024, 12:48 AM
Unknown Object (File)
Jun 29 2024, 12:44 AM
Subscribers

Details

Summary

Inspired by MPASS.

VNPASS repeats the first line for panicstr, I don't know if that's a problem apart from looking weird.

Sample output:

VNASSERT failed: vp->v_holdcnt == 1234 not true at /usr/src/sys/kern/vfs_subr.c:3148 (vputx)
0xfffff80003ba71e8: type VDIR
    usecount 7, writecount 0, refcount 1 mountedhere 0
    flags (VV_ROOT)
    lock type devfs: EXCL by thread 0xfffff800027d96e0 (pid 1, kernel, tid 100002)
panic: foo test
VNASSERT failed: vp->v_holdcnt == 1234 not true at /usr/src/sys/kern/vfs_subr.c:3148 (vputx)
0xfffff80003ba51e8: type VDIR
    usecount 7, writecount 0, refcount 1 mountedhere 0
    flags (VV_ROOT)
    lock type devfs: EXCL by thread 0xfffff800027d96e0 (pid 1, kernel, tid 100002)
panic: condition vp->v_holdcnt == 1234 not met at /usr/src/sys/kern/vfs_subr.c:3148 (vputx)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I would also change VNASSERT in the way you proposed.

This revision is now accepted and ready to land.Jan 28 2020, 4:46 PM
mjg retitled this revision from vfs: add VNPASS macro to vfs: add VNPASS macro and augment VNASSERT to print more about the assert.
mjg edited the summary of this revision. (Show Details)
  • augment VNASSERT
This revision now requires review to proceed.Jan 28 2020, 6:29 PM
mjg edited the summary of this revision. (Show Details)
mjg edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Jan 28 2020, 7:11 PM